fix positioning in fullscreen mode, patch from Gustavo Girldez

2002-05-21  Havoc Pennington  <hp@redhat.com>

	* src/window.c (constrain_position): fix positioning in fullscreen
	mode, patch from Gustavo Girldez
This commit is contained in:
Havoc Pennington 2002-05-21 21:02:33 +00:00 committed by Havoc Pennington
parent b29a41fa43
commit 2567ee81b8
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2002-05-21 Havoc Pennington <hp@redhat.com>
* src/window.c (constrain_position): fix positioning in fullscreen
mode, patch from Gustavo Giráldez
2002-05-20 Alessio Frusciante <algol@firenze.linux.it> 2002-05-20 Alessio Frusciante <algol@firenze.linux.it>
* configure.in: Added Italian to ALL_LINGUAS. * configure.in: Added Italian to ALL_LINGUAS.

View File

@ -5043,11 +5043,9 @@ constrain_position (MetaWindow *window,
* prevents fullscreen, center the window within * prevents fullscreen, center the window within
* the screen area. * the screen area.
*/ */
x += (window->screen->width - window->rect.width - x += (window->screen->width - window->rect.width) / 2;
(window->frame ? (fgeom->left_width + fgeom->right_width) : 0)) / 2;
y += (window->screen->height - window->rect.height - y += (window->screen->height - window->rect.height) / 2;
(window->frame ? (fgeom->top_height + fgeom->bottom_height) : 0)) / 2;
} }
else if (window->maximized) else if (window->maximized)
{ {