diff options
author | Havoc Pennington <hp@pobox.com> | 2003-01-25 16:58:43 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2003-01-25 16:58:43 +0000 |
commit | b73ea5eb0a7199bfc2951695619665685fc9d424 (patch) | |
tree | 2dd9cf94a812e6be5655bf0ebf99d145cf0648ed /src/stack.c | |
parent | e710d9f1b81d2348b488a9abfbd8951afcee49b9 (diff) | |
download | metacity-b73ea5eb0a7199bfc2951695619665685fc9d424.tar.gz |
When checking if a window is fullscreen size, only require it to be at the
2003-01-25 Havoc Pennington <hp@pobox.com>
* src/stack.c (window_is_fullscreen_size): When checking if a
window is fullscreen size, only require it to be at the origin
of the work area, not at the origin of the screen/xinerama.
Still require it to be full screen in width x height.
May fix xine in the case where the user has a top panel.
* src/window.c (constrain_position): restore the ability for
undecorated windows to position themselves overlapping the top
panel, but don't let decorated windows do so. Oh the hacks...
Diffstat (limited to 'src/stack.c')
-rw-r--r-- | src/stack.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/stack.c b/src/stack.c index 5cb5dba5..a3898317 100644 --- a/src/stack.c +++ b/src/stack.c @@ -183,20 +183,33 @@ window_is_fullscreen_size (MetaWindow *window) { int i; - if (window->rect.x <= 0 && - window->rect.y <= 0 && - window->rect.width >= window->screen->width && + if (window->rect.width >= window->screen->width && window->rect.height >= window->screen->height) - return TRUE; + { + /* we use the work area since windows that try to + * position at 0,0 will get pushed down by menu panel + */ + MetaRectangle workarea; + + meta_window_get_work_area (window, FALSE, &workarea); + if (window->rect.x <= workarea.x && + window->rect.y <= workarea.y) + return TRUE; + } i = 0; while (i < window->screen->n_xinerama_infos) { - if (window->rect.x == window->screen->xinerama_infos[i].x_origin && - window->rect.y == window->screen->xinerama_infos[i].y_origin && - window->rect.width >= window->screen->xinerama_infos[i].width && + if (window->rect.width >= window->screen->xinerama_infos[i].width && window->rect.height >= window->screen->xinerama_infos[i].height) - return TRUE; + { + MetaRectangle workarea; + + meta_window_get_work_area (window, TRUE, &workarea); + if (window->rect.x <= workarea.x && + window->rect.y <= workarea.y) + return TRUE; + } ++i; } |