summaryrefslogtreecommitdiff
path: root/dix/enterleave.c
AgeCommit message (Collapse)AuthorFilesLines
2009-02-13dix: doxygen-ify enterleave.cPeter Hutterer1-46/+57
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-05Fix "warning: cast from pointer to integer of different size"Tomas Carnecky1-4/+4
Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08dix: move focus handling into enterleave.c.Peter Hutterer1-7/+793
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-08dix: add a few auxiliary functions for the updated focus model.Peter Hutterer1-0/+54
SetFocusIn and SetFocusOut, including the static array to keep all focus windows. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08dix: reduce FirstPointerChild complexityPeter Hutterer1-54/+10
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>
2009-01-08dix: remove now unused "exclude" parameter from FirstPointerChildPeter Hutterer1-15/+8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08dix: re-implement enter/leave model.Peter Hutterer1-279/+317
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
2008-11-25dix: updated enter/leave core event model.Peter Hutterer1-1/+267
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-25dix: add FirstPointerChild, FirstPointerAncestor auxiliary functions.Peter Hutterer1-0/+100
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>
2008-11-25dix: Add EnterWindow, LeaveWindow, HasPointer auxiliary functions.Peter Hutterer1-0/+50
These replace the ENTER_LEAVE_SEMAPHORE_* macros. Unused currently. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25dix: split enter/leave event handling into core and device handling.Peter Hutterer1-44/+32
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-25dix: move Enter-Leave related functions into new enterleave.cPeter Hutterer1-0/+138
Preparation for the new core enter/leave model. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>