From ce3299e81525b84a380311118d29a6d6c58280de Mon Sep 17 00:00:00 2001 From: Thomas Thurman Date: Sun, 12 Feb 2006 03:17:10 +0000 Subject: [PATCH] Disable alt-f7 if a window can't be moved, and alt-f8 if it can't be 2006-02-11 Thomas Thurman Disable alt-f7 if a window can't be moved, and alt-f8 if it can't be resized. Fixes #328920. * src/keybindings.c (handle_begin_move, handle_begin_resize): check window->has_*_func before beginning operation --- ChangeLog | 8 ++++++++ src/keybindings.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d626081ac..b470a1674 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-02-11 Thomas Thurman + + Disable alt-f7 if a window can't be moved, and alt-f8 if it + can't be resized. Fixes #328920. + + * src/keybindings.c (handle_begin_move, handle_begin_resize): + check window->has_*_func before beginning operation + 2006-02-11 Elijah Newren Add a man page for metacity. Original version taken from Debian diff --git a/src/keybindings.c b/src/keybindings.c index 7c8e7aa12..b8f8a7378 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -3173,7 +3173,7 @@ handle_begin_move (MetaDisplay *display, XEvent *event, MetaKeyBinding *binding) { - if (window) + if (window && window->has_move_func) { meta_window_begin_grab_op (window, META_GRAB_OP_KEYBOARD_MOVING, @@ -3188,7 +3188,7 @@ handle_begin_resize (MetaDisplay *display, XEvent *event, MetaKeyBinding *binding) { - if (window) + if (window && window->has_resize_func) { meta_window_begin_grab_op (window, META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN,