diff options
author | Carlo Wood <carlo@alinoe.com> | 2006-10-13 00:28:34 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2006-10-13 00:28:34 +0000 |
commit | d79a571d0a3f13f9f66a35ecad8110f714c6371b (patch) | |
tree | 116446de0f00f6973e4ba6fcd8d7e82e88279a37 /src/window.c | |
parent | a34944d34143c128b1bb198c826401117e2ac8bf (diff) | |
download | metacity-d79a571d0a3f13f9f66a35ecad8110f714c6371b.tar.gz |
Fix cases when titlebar is allowed offscreen and shouldn't be (and
2006-10-13 Carlo Wood <carlo@alinoe.com>
Fix cases when titlebar is allowed offscreen and shouldn't be (and
vice-versa). #333995.
* src/display.[ch] (struct _MetaDisplay): add grab_frame_action
member
* src/display.[ch] (meta_display_begin_grab_op):
* src/window.[ch] (meta_window_begin_grab_op):
* src/core.[ch] (meta_core_begin_grab_op):
Add frame_action parameter (core & window versions pass it on to
display)
* src/display.c (event_callback):
* src/window.c (meta_window_begin_grab_op,
meta_window_client_message, menu_callback):
* frames.c (meta_frames_button_press_event):
* keybindings.c (do_choose_window, handle_begin_move,
handle_begin_resize, handle_workspace_switch):
Pass whether the action should be considered a 'frame_action',
which will be used to determine whether to force the titlebar to
remain onscreen, to meta_*_begin_grab_op
* constraints.c (constrain_titlebar_visible):
Replace previous ugly hack by using grab_frame_action (and whether
the action is a user action) to determine whether to enforce the
titlebar_visible constraint.
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c index 2cba8178..61170f48 100644 --- a/src/window.c +++ b/src/window.c @@ -4733,6 +4733,13 @@ meta_window_client_message (MetaWindow *window, MetaGrabOp op; int button; guint32 timestamp; + + /* _NET_WM_MOVERESIZE messages are almost certainly going to come from + * clients when users click on the fake "frame" that the client has, + * thus we should also treat such messages as though it were a + * "frame action". + */ + gboolean const frame_action = TRUE; x_root = event->xclient.data.l[0]; y_root = event->xclient.data.l[1]; @@ -4793,7 +4800,7 @@ meta_window_client_message (MetaWindow *window, ((window->has_move_func && op == META_GRAB_OP_KEYBOARD_MOVING) || (window->has_resize_func && op == META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN))) { - meta_window_begin_grab_op (window, op, timestamp); + meta_window_begin_grab_op (window, op, frame_action, timestamp); } else if (op != META_GRAB_OP_NONE && ((window->has_move_func && op == META_GRAB_OP_MOVING) || @@ -4841,7 +4848,9 @@ meta_window_client_message (MetaWindow *window, window->screen, window, op, - FALSE, 0 /* event_serial */, + FALSE, + frame_action, + 0 /* event_serial */, button, 0, timestamp, x_root, @@ -6228,12 +6237,14 @@ menu_callback (MetaWindowMenu *menu, case META_MENU_OP_MOVE: meta_window_begin_grab_op (window, META_GRAB_OP_KEYBOARD_MOVING, + TRUE, timestamp); break; case META_MENU_OP_RESIZE: meta_window_begin_grab_op (window, META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN, + TRUE, timestamp); break; @@ -7640,6 +7651,7 @@ warp_grab_pointer (MetaWindow *window, void meta_window_begin_grab_op (MetaWindow *window, MetaGrabOp op, + gboolean frame_action, guint32 timestamp) { int x, y; @@ -7655,6 +7667,7 @@ meta_window_begin_grab_op (MetaWindow *window, window, op, FALSE, + frame_action, grab_start_serial /* event_serial */, 0 /* button */, 0, |