Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
SetFocusIn and SetFocusOut, including the static array to keep all focus
windows.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Instead of keeping a flag on each window for the devices that are in this
window, keep a local array that holds the current pointer window for each
device. Benefit: searching for the first descendant of a pointer is a simple
run through the array.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The old model was implemented based on a misunderstanding of NotifyVirtual and
NotifyNonlinearVirtual events. It became complicated and was broken in some
places [1]. This patch wipes this model completely.
A much simplified implementation is provided instead. Rather than a top-down
approach ("we have a tree of windows, which ones need to get which event")
this one uses a step-by-step approach. For each window W between A and B
determine the pointer window P as perceived by this window and determine the
event type based on this information. This is in-line with the model described
by Owen Taylor [2].
[1] http://lists.freedesktop.org/archives/xorg/2008-December/041559.html
[2] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html
|
|
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>
|
|
FirstPointerChild: Return the first child that has a pointer within its
boundaries.
FirstPointerAncestor: return the first ancestor with a child within its
boundaries.
These are required for the updated enter/leave model.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
These replace the ENTER_LEAVE_SEMAPHORE_* macros. Unused currently.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
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>
|
|
Preparation for the new core enter/leave model.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|