diff --git a/src/core/constraints.h b/src/core/constraints.h index e5d29ca55..e421e5f10 100644 --- a/src/core/constraints.h +++ b/src/core/constraints.h @@ -33,7 +33,9 @@ typedef enum META_DO_GRAVITY_ADJUST = 1 << 1, META_IS_USER_ACTION = 1 << 2, META_IS_MOVE_ACTION = 1 << 3, - META_IS_RESIZE_ACTION = 1 << 4 + META_IS_RESIZE_ACTION = 1 << 4, + META_FORCE_STATIC_GRAVITY = 1 << 5, + META_IS_INITIAL_RESIZE = 1 << 6 } MetaMoveResizeFlags; void meta_window_constrain (MetaWindow *window, diff --git a/src/core/window.c b/src/core/window.c index e3a5b4e2f..af52a3a9d 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -1439,7 +1439,7 @@ meta_window_new (MetaDisplay *display, * initial map is handled same as configure request */ flags = - META_IS_CONFIGURE_REQUEST | META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION; + META_IS_CONFIGURE_REQUEST | META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION | META_IS_INITIAL_RESIZE; if (!window->override_redirect) meta_window_move_resize_internal (window, flags, @@ -5180,7 +5180,8 @@ meta_window_move_resize_internal (MetaWindow *window, if (need_configure_notify) send_configure_notify (window); - if (!window->placed && window->force_save_user_rect && !window->fullscreen) + if ((flags & META_IS_INITIAL_RESIZE) != 0 && + window->force_save_user_rect && !window->fullscreen) force_save_user_window_placement (window); else if (is_user_action) save_user_window_placement (window);