guess if a window meant to be fullscreen, and if so put it in that state.

2002-05-29  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_move_resize_internal): guess if a
	window meant to be fullscreen, and if so put it in that state.
This commit is contained in:
Havoc Pennington 2002-05-29 04:14:15 +00:00 committed by Havoc Pennington
parent 6077c26cdf
commit 03498549b2
2 changed files with 32 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2002-05-29 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_move_resize_internal): guess if a
window meant to be fullscreen, and if so put it in that state.
2002-05-28 Havoc Pennington <hp@pobox.com>
* src/window.c (redraw_icon): handle missing frame, prevents segv

View File

@ -1865,14 +1865,38 @@ meta_window_move_resize_internal (MetaWindow *window,
*/
int client_move_x;
int client_move_y;
/* We don't need it in the idle queue anymore. */
meta_window_unqueue_move_resize (window);
const MetaXineramaScreenInfo *xinerama;
is_configure_request = (flags & META_IS_CONFIGURE_REQUEST) != 0;
do_gravity_adjust = (flags & META_DO_GRAVITY_ADJUST) != 0;
is_user_action = (flags & META_USER_MOVE_RESIZE) != 0;
xinerama = meta_screen_get_xinerama_for_window (window->screen,
window);
/* Try to guess if a client meant to be fullscreen and use
* the real fullscreen state
*/
if (is_configure_request &&
!window->decorated &&
window->has_fullscreen_func &&
w == xinerama->width &&
h == xinerama->height &&
root_x_nw == xinerama->x_origin &&
root_y_nw == xinerama->y_origin)
{
/* This queues a move resize again, which is why it's
* called before the following unqueue_move_resize
*/
meta_topic (META_DEBUG_GEOMETRY,
"Guessing that window %s meant to be fullscreen\n",
window->desc);
meta_window_make_fullscreen (window);
}
/* We don't need it in the idle queue anymore. */
meta_window_unqueue_move_resize (window);
{
int oldx, oldy;
meta_window_get_position (window, &oldx, &oldy);