From ca2fe384bc2c6c6e1e27e2df71b6d3ce348e2345 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 22 Nov 2005 15:48:30 +0000 Subject: [PATCH] Don't allow removing a window from maximized or fullscreened state to 2005-11-22 Elijah Newren Don't allow removing a window from maximized or fullscreened state to place the titlebar under the top panel. Fixes #322075. * src/display.c (handle_net_moveresize_window): fix up previous comments now that I know a little more, modify the code just slightly to clarify that this is NOT a manual user move/resize operation * src/window.c (meta_window_unmaximize, meta_window_unmake_fullscreen, meta_window_shove_titlebar_onscreen): don't claim that these are manual user move/resize operations --- ChangeLog | 15 +++++++++++++++ src/display.c | 20 +++++++++----------- src/window.c | 6 +++--- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 619286786..9115687d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2005-11-22 Elijah Newren + + Don't allow removing a window from maximized or fullscreened state + to place the titlebar under the top panel. Fixes #322075. + + * src/display.c (handle_net_moveresize_window): fix up previous + comments now that I know a little more, modify the code just + slightly to clarify that this is NOT a manual user move/resize + operation + + * src/window.c (meta_window_unmaximize, + meta_window_unmake_fullscreen, + meta_window_shove_titlebar_onscreen): + don't claim that these are manual user move/resize operations + 2005-11-21 Elijah Newren * src/constraints.c (constrain_partially_onscreen): Relax the diff --git a/src/display.c b/src/display.c index 2d2d20f83..da82c761e 100644 --- a/src/display.c +++ b/src/display.c @@ -1338,14 +1338,12 @@ handle_net_moveresize_window (MetaDisplay* display, if (window) { - /* FIXME!!!! I'm pretty sure this is wrong except _maybe_ for the - * resize-only case; see comment at beginning of - * meta_window_move_resize_internal(). Basically, this should act - * like a configure request--meaning that it should count as an app - * specified change instead of a user one, and the position needs to - * be fixed up with adjust_for_gravity(). In particular, - * meta_window_resize_with_gravity(), meta_window_resize(), and - * meta_window_move_resize() should probably NOT be called. + /* FIXME!!!! This function is _wrong_ except for the resize-only + * case. Even then, it sucks to special case the code instead of + * factoring out common functionality with the configure reqest + * handling, especially since the EWMH says this message should be + * treated identically to a configure request with the exception of + * having a special gravity specified. */ meta_window_get_gravity_position (window, &x, &y); width = window->rect.width; @@ -1369,20 +1367,20 @@ handle_net_moveresize_window (MetaDisplay* display, { if (gravity) meta_window_resize_with_gravity (window, - TRUE, + FALSE, width, height, gravity); else meta_window_resize (window, - TRUE, + FALSE, width, height); } else { meta_window_move_resize (window, - TRUE, + FALSE, x, y, width, diff --git a/src/window.c b/src/window.c index 6e0ab93dd..7cb7d82d8 100644 --- a/src/window.c +++ b/src/window.c @@ -2138,7 +2138,7 @@ meta_window_unmaximize (MetaWindow *window, } meta_window_move_resize (window, - TRUE, + FALSE, window->saved_rect.x, window->saved_rect.y, window->saved_rect.width, @@ -2213,7 +2213,7 @@ meta_window_unmake_fullscreen (MetaWindow *window) window->fullscreen = FALSE; meta_window_move_resize (window, - TRUE, + FALSE, window->saved_rect.x, window->saved_rect.y, window->saved_rect.width, @@ -6345,7 +6345,7 @@ meta_window_shove_titlebar_onscreen (MetaWindow *window) newx = outer_rect.x + window->frame->child_x; newy = outer_rect.y + window->frame->child_y; meta_window_move_resize (window, - TRUE, + FALSE, newx, newy, window->rect.width,