diff options
author | Havoc Pennington <hp@redhat.com> | 2002-04-30 19:52:30 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-04-30 19:52:30 +0000 |
commit | 17b4eab4d44b34134f8b9f89fff4c4411205fdc9 (patch) | |
tree | 63dfd54bf428b438d53577221351b720ee004b0c | |
parent | cb1b7deefa768f6289a22cf60bac648b0b115982 (diff) | |
download | metacity-17b4eab4d44b34134f8b9f89fff4c4411205fdc9.tar.gz |
oops, fix maximization. Pointed out by Gustavo Giráldez
2002-04-30 Havoc Pennington <hp@redhat.com>
* src/window.c (constrain_position): oops, fix
maximization. Pointed out by Gustavo Giráldez
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/window.c | 21 |
2 files changed, 16 insertions, 10 deletions
@@ -1,3 +1,8 @@ +2002-04-30 Havoc Pennington <hp@redhat.com> + + * src/window.c (constrain_position): oops, fix + maximization. Pointed out by Gustavo Giráldez + Tue Apr 30 06:24:09 2002 Jonathan Blandford <jrb@gnome.org> * src/menu.c: give Maximize/Unmaximize and Shade/Unshade the same diff --git a/src/window.c b/src/window.c index 7c092fd8..534a660c 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 } |