keybindings: Limit corner move to current monitor

Moving windows using `move-to-side-X` and `move-corner-XX` keybindings
should keep windows within the confines of current screen.

`move-to-monitor-XXX` keybindings can be used to move windows to other
monitors.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/320
This commit is contained in:
Jānis Džeriņš 2018-09-25 20:59:43 +03:00
parent 9a12befd22
commit 6c5baf89ed

View File

@ -2839,7 +2839,10 @@ handle_move_to_corner_backend (MetaDisplay *display,
MetaRectangle frame_rect;
int new_x, new_y;
meta_window_get_work_area_all_monitors (window, &work_area);
if (!window->monitor)
return;
meta_window_get_work_area_current_monitor (window, &work_area);
meta_window_get_frame_rect (window, &frame_rect);
switch (gravity)