diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2013-09-01 13:04:19 -0700 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2015-10-12 15:40:24 -0400 |
commit | 88e466f8a8b6c80dc488cae6cb67064ea3893c59 (patch) | |
tree | 652a31b4b9d57753c3f95312f01b4fc3b8ff1169 /src/core/window.c | |
parent | 377ecdb86471696b4ba36121ee44d45d0fcbd6c5 (diff) | |
download | mutter-wip/fullscreen.tar.gz |
compositor: add hooks for fullscreen and unfullscreen animationswip/fullscreen
https://bugzilla.gnome.org/show_bug.cgi?id=707248
Diffstat (limited to 'src/core/window.c')
-rw-r--r-- | src/core/window.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/core/window.c b/src/core/window.c index d075cabaa..a3973caad 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -3195,12 +3195,23 @@ meta_window_make_fullscreen (MetaWindow *window) if (!window->fullscreen) { - meta_window_make_fullscreen_internal (window); + 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_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_MOVE_ACTION | + META_MOVE_RESIZE_RESIZE_ACTION | + META_MOVE_RESIZE_STATE_CHANGED | + META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR), NorthWestGravity, window->unconstrained_rect); + + meta_compositor_size_change_window (window->display->compositor, + window, META_SIZE_CHANGE_FULLSCREEN, + &old_frame_rect, &old_buffer_rect); } } @@ -3211,7 +3222,7 @@ meta_window_unmake_fullscreen (MetaWindow *window) if (window->fullscreen) { - MetaRectangle target_rect; + MetaRectangle old_frame_rect, old_buffer_rect, target_rect; meta_topic (META_DEBUG_WINDOW_OPS, "Unfullscreening %s\n", window->desc); @@ -3220,6 +3231,8 @@ meta_window_unmake_fullscreen (MetaWindow *window) target_rect = window->saved_rect; meta_window_frame_size_changed (window); + meta_window_get_frame_rect (window, &old_frame_rect); + meta_window_get_buffer_rect (window, &old_buffer_rect); /* Window's size hints may have changed while maximized, making * saved_rect invalid. #329152 @@ -3234,10 +3247,17 @@ meta_window_unmake_fullscreen (MetaWindow *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_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_update_layer (window); g_object_notify_by_pspec (G_OBJECT (window), obj_props[PROP_FULLSCREEN]); |