From e97ca325e6b470cae1c25979870417b8caf3b07e Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 1 May 2014 19:10:48 -0400 Subject: [PATCH] window-x11: Clean up a bit --- src/x11/window-x11.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index 846fd1c23..9d04d2d90 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -471,6 +471,7 @@ meta_window_apply_session_info (MetaWindow *window, { MetaRectangle rect; MetaMoveResizeFlags flags; + int gravity; window->placed = TRUE; /* don't do placement algorithms later */ @@ -482,17 +483,18 @@ meta_window_apply_session_info (MetaWindow *window, /* Force old gravity, ignoring anything now set */ window->size_hints.win_gravity = info->gravity; + gravity = window->size_hints.win_gravity; flags = META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION; adjust_for_gravity (window, FALSE, - window->size_hints.win_gravity, + gravity, &rect); meta_window_move_resize_internal (window, flags, - window->size_hints.win_gravity, + gravity, rect.x, rect.y, rect.width, rect.height); } } @@ -540,6 +542,7 @@ meta_window_x11_manage (MetaWindow *window) if (!window->override_redirect) { MetaRectangle rect; + int gravity = window->size_hints.win_gravity; rect.x = window->size_hints.x; rect.y = window->size_hints.y; @@ -548,12 +551,12 @@ meta_window_x11_manage (MetaWindow *window) adjust_for_gravity (window, TRUE, - window->size_hints.win_gravity, + gravity, &rect); meta_window_move_resize_internal (window, flags, - window->size_hints.win_gravity, + gravity, rect.x, rect.y, rect.width, rect.height); } }