mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
oops, fix maximization. Pointed out by Gustavo Girldez
2002-04-30 Havoc Pennington <hp@redhat.com> * src/window.c (constrain_position): oops, fix maximization. Pointed out by Gustavo Girldez
This commit is contained in:
parent
cb1b7deefa
commit
17b4eab4d4
@ -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
|
||||
|
21
src/window.c
21
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user