summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-05-29 04:14:15 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-05-29 04:14:15 +0000
commit03498549b2c7ee6ef5161f8b404df257c3847f97 (patch)
tree0ac041223c43fd9a705d2c1c99ff92f4552efb85
parent6077c26cdf57523b5d0a1c2fc2d3a7ddf649453d (diff)
downloadmetacity-03498549b2c7ee6ef5161f8b404df257c3847f97.tar.gz
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.
-rw-r--r--ChangeLog5
-rw-r--r--src/window.c30
2 files changed, 32 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e9212541..113fabf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/src/window.c b/src/window.c
index d2857b9d..79b7f6b3 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1865,13 +1865,37 @@ 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;