[mutter/wip/multitouchr: 40/73] display: Use the grab pointer for delayed window raising
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/multitouchr: 40/73] display: Use the grab pointer for delayed window raising
- Date: Sat, 3 Nov 2012 23:53:34 +0000 (UTC)
commit 95247457efce4e119de79e0d1ba89d052a6998e7
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jul 3 21:16:28 2011 +0200
display: Use the grab pointer for delayed window raising
src/core/display.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 266a422..6e534b0 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1554,22 +1554,26 @@ window_raise_with_delay_callback (void *data)
if (window == NULL)
return FALSE;
+ if (window->cur_grab == NULL)
+ return FALSE;
+
/* If we aren't already on top, check whether the pointer is inside
* the window and raise the window if so.
*/
if (meta_stack_get_top (window->screen->stack) != window)
{
- int x, y, root_x, root_y;
- Window root, child;
- unsigned int mask;
+ int root_x, root_y;
gboolean same_screen;
gboolean point_in_window;
+ MetaDevicePointer *pointer;
meta_error_trap_push (window->display);
- same_screen = XQueryPointer (window->display->xdisplay,
- window->xwindow,
- &root, &child,
- &root_x, &root_y, &x, &y, &mask);
+ pointer = META_DEVICE_POINTER (window->cur_grab->grab_pointer);
+ same_screen = meta_device_pointer_query_position (pointer,
+ window->xwindow,
+ NULL, NULL,
+ &root_x, &root_y,
+ NULL, NULL, NULL);
meta_error_trap_pop (window->display);
point_in_window =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]