diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index f001dfd16..1d25b874c 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -1013,6 +1013,7 @@ meta_compositor_sync_window_geometry (MetaCompositor *compositor, { MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); meta_window_actor_sync_actor_geometry (window_actor, did_placement); + meta_plugin_manager_event_size_changed (compositor->plugin_mgr, window_actor); } static void diff --git a/src/core/window-private.h b/src/core/window-private.h index c7d693412..711097c43 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -78,7 +78,6 @@ typedef enum META_MOVE_RESIZE_RESIZE_ACTION = 1 << 3, META_MOVE_RESIZE_WAYLAND_RESIZE = 1 << 4, META_MOVE_RESIZE_STATE_CHANGED = 1 << 5, - META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR = 1 << 6, } MetaMoveResizeFlags; typedef enum diff --git a/src/core/window.c b/src/core/window.c index e3e15cf26..6cef63515 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -2741,23 +2741,21 @@ meta_window_maximize (MetaWindow *window, directions, saved_rect); - MetaRectangle old_frame_rect, old_buffer_rect, new_rect; + MetaRectangle old_frame_rect, old_buffer_rect; meta_window_get_frame_rect (window, &old_frame_rect); meta_window_get_buffer_rect (window, &old_buffer_rect); - meta_window_move_resize_internal (window, - (META_MOVE_RESIZE_MOVE_ACTION | - META_MOVE_RESIZE_RESIZE_ACTION | - META_MOVE_RESIZE_STATE_CHANGED | - META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR), - NorthWestGravity, - window->unconstrained_rect); - meta_window_get_frame_rect (window, &new_rect); - meta_compositor_size_change_window (window->display->compositor, window, META_SIZE_CHANGE_MAXIMIZE, &old_frame_rect, &old_buffer_rect); + + meta_window_move_resize_internal (window, + (META_MOVE_RESIZE_MOVE_ACTION | + META_MOVE_RESIZE_RESIZE_ACTION | + META_MOVE_RESIZE_STATE_CHANGED), + NorthWestGravity, + window->unconstrained_rect); } } @@ -3004,7 +3002,6 @@ meta_window_unmaximize (MetaWindow *window, MetaMaximizeFlags directions) { gboolean unmaximize_horizontally, unmaximize_vertically; - MetaRectangle new_rect; g_return_if_fail (!window->override_redirect); @@ -3095,19 +3092,17 @@ meta_window_unmaximize (MetaWindow *window, ensure_size_hints_satisfied (&target_rect, &window->size_hints); meta_window_client_rect_to_frame_rect (window, &target_rect, &target_rect); - meta_window_move_resize_internal (window, - (META_MOVE_RESIZE_MOVE_ACTION | - META_MOVE_RESIZE_RESIZE_ACTION | - META_MOVE_RESIZE_STATE_CHANGED | - META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR), - NorthWestGravity, - target_rect); - - meta_window_get_frame_rect (window, &new_rect); meta_compositor_size_change_window (window->display->compositor, window, META_SIZE_CHANGE_UNMAXIMIZE, &old_frame_rect, &old_buffer_rect); + meta_window_move_resize_internal (window, + (META_MOVE_RESIZE_MOVE_ACTION | + META_MOVE_RESIZE_RESIZE_ACTION | + META_MOVE_RESIZE_STATE_CHANGED), + NorthWestGravity, + target_rect); + /* When we unmaximize, if we're doing a mouse move also we could * get the window suddenly jumping to the upper left corner of * the workspace, since that's where it was when the grab op @@ -3215,18 +3210,17 @@ meta_window_make_fullscreen (MetaWindow *window) meta_window_get_frame_rect (window, &old_frame_rect); meta_window_get_buffer_rect (window, &old_buffer_rect); + meta_compositor_size_change_window (window->display->compositor, + window, META_SIZE_CHANGE_FULLSCREEN, + &old_frame_rect, &old_buffer_rect); + meta_window_make_fullscreen_internal (window); meta_window_move_resize_internal (window, (META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION | - META_MOVE_RESIZE_STATE_CHANGED | - META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR), + META_MOVE_RESIZE_STATE_CHANGED), NorthWestGravity, window->unconstrained_rect); - - meta_compositor_size_change_window (window->display->compositor, - window, META_SIZE_CHANGE_FULLSCREEN, - &old_frame_rect, &old_buffer_rect); } } @@ -3261,18 +3255,17 @@ meta_window_unmake_fullscreen (MetaWindow *window) meta_window_recalc_features (window); set_net_wm_state (window); - meta_window_move_resize_internal (window, - (META_MOVE_RESIZE_MOVE_ACTION | - META_MOVE_RESIZE_RESIZE_ACTION | - META_MOVE_RESIZE_STATE_CHANGED | - META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR), - NorthWestGravity, - target_rect); - meta_compositor_size_change_window (window->display->compositor, window, META_SIZE_CHANGE_UNFULLSCREEN, &old_frame_rect, &old_buffer_rect); + meta_window_move_resize_internal (window, + (META_MOVE_RESIZE_MOVE_ACTION | + META_MOVE_RESIZE_RESIZE_ACTION | + META_MOVE_RESIZE_STATE_CHANGED), + NorthWestGravity, + target_rect); + meta_screen_queue_check_fullscreen (window->screen); g_object_notify_by_pspec (G_OBJECT (window), obj_props[PROP_FULLSCREEN]); @@ -3731,7 +3724,7 @@ meta_window_move_resize_internal (MetaWindow *window, { window->unconstrained_rect = unconstrained_rect; - if (window->known_to_compositor && !(flags & META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR)) + if (window->known_to_compositor) meta_compositor_sync_window_geometry (window->display->compositor, window, did_placement);