summaryrefslogtreecommitdiff
path: root/dix/events.c
AgeCommit message (Collapse)AuthorFilesLines
2008-04-25dix: let PickPointer() return devices that are core-grabbed by the client.Peter Hutterer1-1/+22
If the client currently holds a core grab on any device, this device has priority, even over the ClientPointer.
2008-04-23dix: always send FocusIn events if mode is NotifyUngrab.Peter Hutterer1-0/+2
In the case of a NotifyUngrab, the flag for the device may already be set but we still need to send the FocusIn event.
2008-04-22Merge branch 'master' into mpxPeter Hutterer1-0/+7
Conflicts: Xext/EVI.c Xext/appgroup.c Xext/cup.c Xext/mitmisc.c Xext/sampleEVI.c dix/window.c
2008-04-14Merge whot@wombat:~/potoroo/xserver into mpxPeter Hutterer1-1/+1
2008-04-13dix: Ignore focus for passive grabs if the event is a pointer event.Peter Hutterer1-1/+1
2008-04-11Merge whot@wombat:~/potoroo/xserver into mpxPeter Hutterer1-60/+86
2008-04-10dix: Rework Enter/Leave semaphore system.Peter Hutterer1-56/+68
Instead of a simple counter, use bits to keep track of which device is where etc. When device enters a window (or sets focus), the bit matching the device is set, when it leaves again, it is unset. If there are 0 bits set, then Leave/Enter/Focus events may be sent to the client. Same theory as before, but this should get around the insanity with Grab/Ungrab special cases. Those cases are basically untested though.
2008-04-10Xi: only DeliverFocusedEvents if the event is not a pointer event.Peter Hutterer1-2/+2
A pointer device may have a focus class, but even if so, pointer events must be delivered to the sprite window, not the focus window.
2008-04-10dix: Extend IsKeyboardDevice() to not include pointer devices.Peter Hutterer1-1/+4
If a pointer devices has key classes as well, don't register it as a keyboard device. Let's see how much that change will break.
2008-04-10dix: Dont deliver grabbed pointer events to a focus window.Peter Hutterer1-1/+12
If an pointer event is being processed during a device grab, don't deliver it to the focus window, even if the device has a focus class. Reason being that some pointers may have a focus class, thus killing drag-and-drop.
2008-04-08XQuartz: Fix issue where clicking on an X11 window might send that event to ↵Jeremy Huddleston1-0/+7
an X11 window in another space. (cherry picked from commit df21312c8b0e9ef0c809bfc57cdf64f27db0d8a7) (cherry picked from commit 2d4194a8d124e7a9c7cd1b83635ba6957aa4ae1c)
2008-04-08dix: Ensure Proximity events don't kill the server.Magnus Vigerlöf1-16/+20
Add Prox events to the if-clauses with the other events that are usually sent from the input devices. Ensure that the event deliverers won't try to deliver events of type '0' (some extended events doesn't have an equivalent core-type) Small modification by Peter Hutterer. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-04-06dix: remove debug error message about XI->core type conversion.Peter Hutterer1-2/+0
2008-02-25Xi: remove ungrab handling of ExtendedUngrabDevice request.Peter Hutterer1-12/+0
This can be done by UngrabDevice, no need for separate codepaths.
2008-02-19dix: add InputEventListLen and SetMinimumEventSizePeter Hutterer1-1/+2
The latter is used to increase the amount of allocated memory for the event list. This will be needed for ClassesChangedEvents that can be of more or less arbitrary size (larger than 32 anyway).
2008-02-18Move input event list initialisation and storage from DDX to DIX.Peter Hutterer1-0/+4
Rather than letting the DDX allocate the events, allocate them once in the DIX and just pass it around when needed. DDX should call GetEventList() to obtain this list and then pass it into Get{Pointer|Keyboard}Events.
2008-01-30dix: print out event type if a bogus pointer event occurs.Peter Hutterer1-1/+1
2008-01-25Xext: add GEDeviceMaskIsSet (GE mask checking per device)Peter Hutterer1-2/+2
If a mask was set for the NULL device, then we pretend the mask is set for all devices.
2008-01-18dix: if a client has a core grab, return the grab device on QueryPointer.Peter Hutterer1-1/+15
The correct thing would be to return the ClientPointer. However, if the client for some reason has a core grab on another device (e.g. as result of a passive grab), return the coordinates of the grabbed device instead. This makes the use of nautilus a bit saner.
2008-01-18dix: remove some superfluous lines in ProcChangeActivePointerGrab.Peter Hutterer1-6/+1
2008-01-18dix: free the genericMasks when ungrabbing.Peter Hutterer1-3/+15
This finally plugs a memory hole created by grabs registering for generic events.
2008-01-18dix: remove inputInfo.pointer refernce in EventSelectForWindowPeter Hutterer1-5/+9
If the window being changed is set as the motion hint window for any device, the device's motion hint window is set to NULL. Which is kinda what the old code did, except that it did it with only the VCP.
2008-01-18dix: remove inputInfo.pointer reference in TryClientEvents.Peter Hutterer1-22/+29
Unfortunately, this requires a change in the TCE API, and thus a change in all callers. Tough luck.
2008-01-15dix: print out an error when core type can't be converted.Peter Hutterer1-0/+3
Helps a bit in tracking down bugs.
2008-01-15dix: Process an input event as a single event, instead of two separate ones.Peter Hutterer1-97/+141
This is a significant shift in how input events are perceived. The common approach was to treat a core event as a different entity than the XI event. This could result in the XI event being delivered to a different client than the core event. This doesn't work nicely if they come from the same device. Instead, we treat an input event as a single event, that is delivered through two separate APIs. So when delivering an event, we first try the XI event, then the core event. If the window want's neither, we go to the parent and repeat. Once either core or XI has been delivered, the processing stops. Important: Different to the previous method, if a client registers for core button events, the parent window will not get XI events. This should only cause problems when you're mixing core and XI events, so don't do that! Generic events don't fit into this yet, they cause me headaches.
2008-01-15dix: Emulate core events within CheckDeviceGrabs and ComputeFreezes.Peter Hutterer1-35/+46
This should restore the correct passive grab processing. When checking for passive grabs, the core event is emulated and we check first for XI grabs on the window, then for core grabs. Regardless of which event activates the grab, the XI event is stored in the device's EQ. When replaying the event, we take the XI event and replay it on the next window, again including the emulation of the core event.
2008-01-13dix: remove obsolete comment.Peter Hutterer1-3/+1
Pairings don't exist anymore and the documented issue is a non-issue now.
2008-01-07dix: don't try to confine cursor on screen restructure if there is no cursor.Peter Hutterer1-0/+2
Stops segfaulting when using xrandr. Yay.
2008-01-07dix: init GrabPrivateKey to correct value.Peter Hutterer1-1/+1
Merge detritus from last pull.
2008-01-03Merge branch 'master' into mpxPeter Hutterer1-80/+147
Conflicts: XTrap/xtrapddmi.c Xext/security.c Xext/xprint.c Xext/xtest.c Xext/xvdisp.c Xi/exevents.c Xi/grabdevb.c Xi/grabdevk.c Xi/opendev.c Xi/ungrdev.c Xi/ungrdevb.c Xi/ungrdevk.c dix/cursor.c dix/devices.c dix/dixutils.c dix/events.c dix/getevents.c dix/main.c dix/window.c hw/xfree86/ramdac/xf86Cursor.c include/dix.h include/input.h include/inputstr.h mi/midispcur.c mi/miinitext.c mi/misprite.c render/animcur.c xfixes/cursor.c xkb/xkbAccessX.c
2007-12-11dix: when getting a bogus event, at least print out the type.Peter Hutterer1-1/+1
2007-12-04dix: update comments about inputInfo.pointer.Peter Hutterer1-7/+4
2007-12-04dix: change the filters to be per-device.Peter Hutterer1-24/+40
If we have one global filter, one pointer may change the filter value and affect another pointer. Reproduceable effect: blackbox and xterm, start dragging xterm then click anywhere with the other pointer (attached to different masterd device!). The button release resets the filter[Motion_Filter(button)] value, thus stopping dragging and no event is sent to the client anymore. Having the filters set per device gets around this.
2007-12-04dix: comments, whitespaces, copyright fixes.Peter Hutterer1-6/+6
Removing my copyright message for now, should eventually be in line with the rest of the messages.
2007-12-04dix: remove #ifdef XINPUT.Peter Hutterer1-27/+9
No escaping XINPUT anymore.
2007-11-30dix: only freeze the paired MD on a grab, not all other devices.Peter Hutterer1-15/+16
2007-11-24dix: fix typoPeter Hutterer1-1/+1
2007-11-24dix: Add special treatment of NotifyUngrab for enter/leave events.Peter Hutterer1-7/+12
In some cases (e.g. using x2x) the previous model broke, with a window ending not counting down to 0 anymore. Special treatment for NotifyUngrab seems to help here. Current solution: If a NotifyGrab is to be sent ignore it. If a NotifyUngrab enter is sent, only adjust the semaphore if it is on 0. Likewise, do the same for a NotifyUngrab leave if the semaphore is on 1. This seems to work alright so far.
2007-11-19Merge branch 'master' into XACE-SELINUXEamon Walsh1-2/+2
Conflicts: hw/xnest/Pixmap.c include/dix.h
2007-11-15Small static cleanups on dix/Adam Jackson1-2/+2
2007-11-13dix: remove trailing/wrong whitespaces from devices.c and events.cPeter Hutterer1-333/+333
2007-11-12dix: allow grab modifier device to be NULL.Peter Hutterer1-6/+11
This can happen if we check for a passive core grab and our device is a floating slave device. Doesn't really change anything as SDs can't send core events but it stops the server from segfaulting.
2007-11-09dix: grabbing an attached SD sets it floating for the duration of the grab.Peter Hutterer1-8/+83
2007-11-08Merge branch 'mpx' into mdsdPeter Hutterer1-4/+75
Conflicts: Xi/opendev.c
2007-11-07Merge branch 'master' into mpxPeter Hutterer1-0/+63
Conflicts: Xi/extinit.c Xi/grabdev.c Xi/setmode.c Xi/ungrdev.c dix/devices.c dix/events.c dix/getevents.c include/dix.h mi/midispcur.c mi/misprite.c xkb/xkbActions.c xkb/xkbEvents.c xkb/xkbPrKeyEv.c
2007-11-05Merge branch 'master' into XACE-SELINUXEamon Walsh1-13/+11
Conflicts: dix/dispatch.c dix/property.c hw/xfree86/common/xf86VidMode.c include/xkbsrv.h render/glyph.c xkb/xkbActions.c
2007-10-28dix: don't compress motion events from different devices (EventEnqueue)Peter Hutterer1-1/+2
(cherry picked from commit 8840829ab93c4eb62eb58753c015da5307133fe5)
2007-10-28dix: add XI event support to FixKeyState.Peter Hutterer1-12/+9
FixKeyState needs to be able to handle XI events, otherwise we get "impossible keyboard events" on server zaps and other special key combos. (cherry picked from commit 5ee409794ee604fcf84886f70429fc2d6b1ff4f1)
2007-10-25xace: Add a "manage" access check when setting the Redirect event bits.Eamon Walsh1-0/+10
2007-10-24dix: Don't interfere grabs the interfering device is of different type.Peter Hutterer1-1/+3
A pointer device should be able to send events while the client has a core grab on a keyboard device, and likewise.