[mutter] window: Pass the grab timestamp when updating the resize grab
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Pass the grab timestamp when updating the resize grab
- Date: Thu, 13 Dec 2012 23:19:23 +0000 (UTC)
commit c90765370d2aba7f413768a1089fecdeee271b59
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Dec 13 17:06:00 2012 -0500
window: Pass the grab timestamp when updating the resize grab
Since XChangeActivePointerGrab doesn't have a direct equivalent
in XI2, we need to make sure we don't re-grab with a newer
tiemstamp.
src/core/display-private.h | 1 +
src/core/display.c | 2 ++
src/core/window.c | 5 +----
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/core/display-private.h b/src/core/display-private.h
index e0747b2..a4636e1 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -211,6 +211,7 @@ struct _MetaDisplay
GList* grab_old_window_stacking;
MetaEdgeResistanceData *grab_edge_resistance_data;
unsigned int grab_last_user_action_was_snap;
+ guint32 grab_timestamp;
/* we use property updates as sentinels for certain window focus events
* to avoid some race conditions on EnterNotify events
diff --git a/src/core/display.c b/src/core/display.c
index a989a05..a99193f 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -3873,6 +3873,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
#endif
display->grab_frame_action = frame_action;
display->grab_resize_unmaximize = 0;
+ display->grab_timestamp = timestamp;
if (display->grab_resize_timeout_id)
{
@@ -4058,6 +4059,7 @@ meta_display_end_grab_op (MetaDisplay *display,
}
#endif /* HAVE_XSYNC */
+ display->grab_timestamp = 0;
display->grab_window = NULL;
display->grab_screen = NULL;
display->grab_xwindow = None;
diff --git a/src/core/window.c b/src/core/window.c
index 2942de6..df466af 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -9866,15 +9866,12 @@ meta_window_update_keyboard_resize (MetaWindow *window,
if (update_cursor)
{
- guint32 timestamp;
- /* FIXME: Using CurrentTime is really bad mojo */
- timestamp = CurrentTime;
meta_display_set_grab_op_cursor (window->display,
NULL,
window->display->grab_op,
TRUE,
window->display->grab_xwindow,
- timestamp);
+ window->display->grab_timestamp);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]