mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
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...
This commit is contained in:
parent
e710d9f1b8
commit
b73ea5eb0a
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
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...
|
||||||
|
|
||||||
2003-01-08 Havoc Pennington <hp@pobox.com>
|
2003-01-08 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* src/screen.c (meta_screen_apply_startup_properties): small code
|
* src/screen.c (meta_screen_apply_startup_properties): small code
|
||||||
|
25
src/stack.c
25
src/stack.c
@ -183,20 +183,33 @@ window_is_fullscreen_size (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (window->rect.x <= 0 &&
|
if (window->rect.width >= window->screen->width &&
|
||||||
window->rect.y <= 0 &&
|
|
||||||
window->rect.width >= window->screen->width &&
|
|
||||||
window->rect.height >= window->screen->height)
|
window->rect.height >= window->screen->height)
|
||||||
|
{
|
||||||
|
/* 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;
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < window->screen->n_xinerama_infos)
|
while (i < window->screen->n_xinerama_infos)
|
||||||
{
|
{
|
||||||
if (window->rect.x == window->screen->xinerama_infos[i].x_origin &&
|
if (window->rect.width >= window->screen->xinerama_infos[i].width &&
|
||||||
window->rect.y == window->screen->xinerama_infos[i].y_origin &&
|
|
||||||
window->rect.width >= window->screen->xinerama_infos[i].width &&
|
|
||||||
window->rect.height >= window->screen->xinerama_infos[i].height)
|
window->rect.height >= window->screen->xinerama_infos[i].height)
|
||||||
|
{
|
||||||
|
MetaRectangle workarea;
|
||||||
|
|
||||||
|
meta_window_get_work_area (window, TRUE, &workarea);
|
||||||
|
if (window->rect.x <= workarea.x &&
|
||||||
|
window->rect.y <= workarea.y)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
@ -5895,6 +5895,14 @@ constrain_position (MetaWindow *window,
|
|||||||
if (offscreen_w > 0)
|
if (offscreen_w > 0)
|
||||||
nw_x -= offscreen_w;
|
nw_x -= offscreen_w;
|
||||||
|
|
||||||
|
/* do it for top of window for undecorated windows,
|
||||||
|
* since losing the titlebar isn't really an issue anyway,
|
||||||
|
* and it fixes fullscreen mode for stuff like Xine.
|
||||||
|
* but don't lose the titlebar on decorated windows.
|
||||||
|
*/
|
||||||
|
if (!window->decorated && offscreen_h > 0)
|
||||||
|
nw_y -= offscreen_h;
|
||||||
|
|
||||||
/* Limit movement off the right/bottom.
|
/* Limit movement off the right/bottom.
|
||||||
* Remember, we're constraining StaticGravity position.
|
* Remember, we're constraining StaticGravity position.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user