[mutter] Consistently use meta_grab_op_is_resizing() for _NET_WM_SYNC_REQUEST
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Consistently use meta_grab_op_is_resizing() for _NET_WM_SYNC_REQUEST
- Date: Wed, 13 Feb 2013 14:51:00 +0000 (UTC)
commit 0503f6bb9a9298d10543371d4044c27792d137d8
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Jan 30 14:49:31 2013 -0500
Consistently use meta_grab_op_is_resizing() for _NET_WM_SYNC_REQUEST
In different places we checked the grab op differently when determing
whether we are using _NET_WM_SYNC_REQUEST. This was somewhat covered
up previously by the fact that we only had a sync alarm when using
_NET_WM_SYNC_REQUEST, but that is no longer the case, so consistently
use meta_grab_op_is_resizing() everywhere.
https://bugzilla.gnome.org/show_bug.cgi?id=685463
src/core/window.c | 43 ++++++++++---------------------------------
1 files changed, 10 insertions(+), 33 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 3c4026f..eb135ac 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -5122,6 +5122,7 @@ meta_window_move_resize_internal (MetaWindow *window,
#ifdef HAVE_XSYNC
if (window == window->display->grab_window &&
+ meta_grab_op_is_resizing (window->display->grab_op) &&
window->sync_request_counter != None &&
window->sync_request_alarm != None &&
window->sync_request_time.tv_usec == 0 &&
@@ -9520,9 +9521,8 @@ meta_window_update_sync_request_counter (MetaWindow *window,
meta_compositor_set_updates_frozen (window->display->compositor, window,
meta_window_updates_are_frozen (window));
- if (window->display->grab_op != META_GRAB_OP_NONE &&
- window == window->display->grab_window &&
- meta_grab_op_is_mouse (window->display->grab_op) &&
+ if (window == window->display->grab_window &&
+ meta_grab_op_is_resizing (window->display->grab_op) &&
new_counter_value >= window->display->grab_sync_counter_wait_serial)
{
meta_topic (META_DEBUG_RESIZING,
@@ -9538,36 +9538,13 @@ meta_window_update_sync_request_counter (MetaWindow *window,
window->sync_request_time.tv_sec = 0;
window->sync_request_time.tv_usec = 0;
- /* This means we are ready for another configure. */
- switch (window->display->grab_op)
- {
- case META_GRAB_OP_RESIZING_E:
- case META_GRAB_OP_RESIZING_W:
- case META_GRAB_OP_RESIZING_S:
- case META_GRAB_OP_RESIZING_N:
- case META_GRAB_OP_RESIZING_SE:
- case META_GRAB_OP_RESIZING_SW:
- case META_GRAB_OP_RESIZING_NE:
- case META_GRAB_OP_RESIZING_NW:
- case META_GRAB_OP_KEYBOARD_RESIZING_S:
- case META_GRAB_OP_KEYBOARD_RESIZING_N:
- case META_GRAB_OP_KEYBOARD_RESIZING_W:
- case META_GRAB_OP_KEYBOARD_RESIZING_E:
- case META_GRAB_OP_KEYBOARD_RESIZING_SE:
- case META_GRAB_OP_KEYBOARD_RESIZING_NE:
- case META_GRAB_OP_KEYBOARD_RESIZING_SW:
- case META_GRAB_OP_KEYBOARD_RESIZING_NW:
- /* no pointer round trip here, to keep in sync */
- update_resize (window,
- window->display->grab_last_user_action_was_snap,
- window->display->grab_latest_motion_x,
- window->display->grab_latest_motion_y,
- TRUE);
- break;
-
- default:
- break;
- }
+ /* This means we are ready for another configure;
+ * no pointer round trip here, to keep in sync */
+ update_resize (window,
+ window->display->grab_last_user_action_was_snap,
+ window->display->grab_latest_motion_x,
+ window->display->grab_latest_motion_y,
+ TRUE);
}
}
#endif /* HAVE_XSYNC */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]