summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Lindqvist <bjourne@gmail.com>2006-07-24 17:15:32 +0000
committerElijah Newren <newren@src.gnome.org>2006-07-24 17:15:32 +0000
commit3d661f9bc7848b827f5be4ed04727ae0e3e824a8 (patch)
tree797ccea74add61a78b306285c65aa9c5d62e54d1
parent34662a6a3a65a6098769ae7d3f732ce24b2ab56d (diff)
downloadmetacity-3d661f9bc7848b827f5be4ed04727ae0e3e824a8.tar.gz
Grab Alt+Shift+Button1 as well to partially fix operation ordering issues
2006-07-24 Björn Lindqvist <bjourne@gmail.com> * src/display.c (meta_display_grab_window_buttons): Grab Alt+Shift+Button1 as well to partially fix operation ordering issues when trying to snap-move windows. Part of #112478.
-rw-r--r--ChangeLog6
-rw-r--r--src/display.c26
2 files changed, 24 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index c8dc8929..21062266 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-24 Björn Lindqvist <bjourne@gmail.com>
+
+ * display.c (meta_display_grab_window_buttons): Grab
+ Alt+Shift+Button1 as well to partially fix operation ordering
+ issues when trying to snap-move windows. Part of #112478.
+
2006-07-21 Thomas Thurman <thomas@thurman.org.uk>
* ui.[ch] (filter_func): Avoid a case where a struct's
diff --git a/src/display.c b/src/display.c
index cf02a9e2..f7a9bcc4 100644
--- a/src/display.c
+++ b/src/display.c
@@ -3711,8 +3711,10 @@ void
meta_display_grab_window_buttons (MetaDisplay *display,
Window xwindow)
{
- /* Grab Alt + button1 and Alt + button2 for moving window,
- * and Alt + button3 for popping up window menu.
+ /* Grab Alt + button1 for moving window.
+ * Grab Alt + button2 for resizing window.
+ * Grab Alt + button3 for popping up window menu.
+ * Grab Alt + Shift + button1 for snap-moving window.
*/
meta_verbose ("Grabbing window buttons for 0x%lx\n", xwindow);
@@ -3724,11 +3726,10 @@ meta_display_grab_window_buttons (MetaDisplay *display,
if (display->window_grab_modifiers != 0)
{
gboolean debug = g_getenv ("METACITY_DEBUG_BUTTON_GRABS") != NULL;
- int i = 1;
- while (i < 4)
+ int i;
+ for (i = 1; i < 4; i++)
{
- meta_change_button_grab (display,
- xwindow,
+ meta_change_button_grab (display, xwindow,
TRUE,
FALSE,
i, display->window_grab_modifiers);
@@ -3741,9 +3742,18 @@ meta_display_grab_window_buttons (MetaDisplay *display,
TRUE,
FALSE,
i, ControlMask);
-
- ++i;
}
+
+ /* In addition to grabbing Alt+Button1 for moving the window,
+ * grab Alt+Shift+Button1 for snap-moving the window. See bug
+ * 112478. Unfortunately, this doesn't work with
+ * Shift+Alt+Button1 for some reason; so at least part of the
+ * order still matters, which sucks (please FIXME).
+ */
+ meta_change_button_grab (display, xwindow,
+ TRUE,
+ FALSE,
+ 1, display->window_grab_modifiers | ShiftMask);
}
}