From: Peter Hutterer <[EMAIL PROTECTED]> These replace the ENTER_LEAVE_SEMAPHORE_* macros. Unused currently.
Signed-off-by: Peter Hutterer <[EMAIL PROTECTED]> --- dix/enterleave.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/dix/enterleave.c b/dix/enterleave.c index 11929c6..79d15fd 100644 --- a/dix/enterleave.c +++ b/dix/enterleave.c @@ -34,6 +34,44 @@ #include "enterleave.h" /** + * Return TRUE if @win has a pointer within its boundaries, excluding child + * window. + */ +static BOOL +HasPointer(WindowPtr win) +{ + int i; + + for (i = 0; i < sizeof(win->enterleave); i++) + if (win->enterleave[i]) + return TRUE; + + return FALSE; +} + +/** + * Set the presence flag for @dev to mark that it is now in @win. + */ +static void +EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode) +{ + + if (dev->isMaster && mode != NotifyGrab) + win->enterleave[dev->id/8] |= (1 << (dev->id % 8)); +} + +/** + * Unset the presence flag for @dev to mark that it is not in @win anymore. + */ +static void +LeaveWindow(DeviceIntPtr dev, WindowPtr win, int mode) +{ + if (dev->isMaster && mode != NotifyUngrab) + win->enterleave[dev->id/8] &= ~(1 << (dev->id % 8)); +} + + +/** * @return The window that is the first ancestor of both a and b. */ WindowPtr -- 1.6.0.3 _______________________________________________ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg