mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
window: Notify about size-change when changing monitor
When moving to another monitor the window size may change in some cases. While unconditionally notifying a size change is not always correct, it animates the window when moved to another monitor in GNOME Shell. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2558>
This commit is contained in:
parent
98adff03da
commit
33dc8ca187
@ -4089,9 +4089,18 @@ meta_window_move_to_monitor (MetaWindow *window,
|
||||
}
|
||||
else
|
||||
{
|
||||
MetaRectangle old_frame_rect, old_buffer_rect;
|
||||
|
||||
if (monitor == window->monitor->number)
|
||||
return;
|
||||
|
||||
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_MONITOR_MOVE,
|
||||
&old_frame_rect, &old_buffer_rect);
|
||||
|
||||
meta_window_move_between_rects (window, 0, &old_area, &new_area);
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,7 @@ typedef enum
|
||||
META_SIZE_CHANGE_UNMAXIMIZE,
|
||||
META_SIZE_CHANGE_FULLSCREEN,
|
||||
META_SIZE_CHANGE_UNFULLSCREEN,
|
||||
META_SIZE_CHANGE_MONITOR_MOVE,
|
||||
} MetaSizeChange;
|
||||
|
||||
META_EXPORT
|
||||
|
Loading…
Reference in New Issue
Block a user