Commit Graph

7 Commits

Author SHA1 Message Date
Peter Hutterer
d3e5629fac dix: call SetFocusOut and LeaveWindow when disabling a device.
PointerWindows[x] would be set after removing a master pointer. Destroying
this window then crashed the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-03 10:11:48 +10:00
Peter Hutterer
97ed946cfc dix: SetFocusOut and LeaveWindow don't need parameters other than dev.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-03 10:11:48 +10:00
Peter Hutterer
46ac9f9241 dix: pass the sourceid around for enter/leave events.
The sourceid for enter/leave events as a result of pointer motion is the ID
of the slave device. The sourceid for those as a result of a grab activating
is the device itself.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30 11:04:28 +10:00
Peter Hutterer
eb2d7b3d70 dix: move focus handling into enterleave.c.
This commit moves the focus handling from events.c into enterleave.c and
implements a model similar to the core enter/leave model.
For a full description of the model, see:
http://lists.freedesktop.org/archives/xorg/2008-December/041740.html

This commit also gets rid of the focusinout array in the WindowRec, ditching
it in favour of a local array that keeps the current focus window for each
device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08 11:45:22 +10:00
Peter Hutterer
b292a7a2d7 dix: updated enter/leave core event model.
As proposed by Owen Taylor [1], the enter-leave event model needs to adjust
the events sent to each window depending on the presence of pointers in a
window, or in a subwindow.

The new model can be summarised as:
- if the pointer moves into or out of a window that has a pointer in a child
  window, the events are modified to appear as if the pointer was moved out of
  or into this child window.
- if the pointer moves into or out of a window that has a pointer in a parent
  window, the events are modified to appear as if the pointer was moved out of
  or into this parent window.

Note that this model requires CoreEnterLeaveEvent and DeviceEnterLeaveEvent to
be split and treated separately.

[1] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25 09:21:46 +10:00
Peter Hutterer
6bdc963cda dix: split enter/leave event handling into core and device handling.
Device events always need to be delivered, core events only in some cases.
Let's keep them completely separate so we can adjust core event delivery.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25 09:21:45 +10:00
Peter Hutterer
868fd503b7 dix: move Enter-Leave related functions into new enterleave.c
Preparation for the new core enter/leave model.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25 09:21:45 +10:00