diff --git a/ChangeLog b/ChangeLog index 280fb0539..947b6ef18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-04-30 Havoc Pennington + + * src/window.c (constrain_position): oops, fix + maximization. Pointed out by Gustavo Giráldez + Tue Apr 30 06:24:09 2002 Jonathan Blandford * src/menu.c: give Maximize/Unmaximize and Shade/Unshade the same diff --git a/src/window.c b/src/window.c index 7c092fd87..534a660c7 100644 --- a/src/window.c +++ b/src/window.c @@ -4893,13 +4893,23 @@ constrain_position (MetaWindow *window, x = 0; y = 0; } + else if (window->maximized) + { + x = work_area.x; + y = work_area.y; + if (window->frame) + { + x += fgeom->left_width; + y += fgeom->top_height; + } + } else if (window->type != META_WINDOW_DESKTOP && window->type != META_WINDOW_DOCK) { int nw_x, nw_y; int se_x, se_y; int offscreen_w, offscreen_h; - + /* (FIXME instead of TITLEBAR_LENGTH_ONSCREEN, get the actual * size of the menu control?). */ @@ -4990,15 +5000,6 @@ constrain_position (MetaWindow *window, x = nw_x; if (y < nw_y) y = nw_y; - - /* If maximized, force the exact position */ - if (window->maximized) - { - if (x != nw_x) - x = nw_x; - if (y != nw_y) - y = nw_y; - } #undef TITLEBAR_LENGTH_ONSCREEN }