Window movement to sides/corners with multiple monitors
Currently keybindings move-to-side-X
and move-to-corner-XX
have two problems in a multi-monitor setup:
-
If there is a monitor at the side the window is moved to then the window is moved over to the other monitor, which is counter-intuitive. If the user wants the window on the other monitor they would use
move-to-monitor-XXX
keybindings. -
If the two monitors have different sizes (pixel-wise) or if the monitors are arranged so that their non-common edges are offset, then moving a window using one of the mentioned keybindings will move the window off-screen. As an example see the attached monitor arrangement. If there is a window in the upper-right corner of monitor 2, then moving it down with
move-to-side-s
will make the lower part of the window invisible (or even the whole window moved off-screen if the window is not big enough).
Both of these issues can be fixed by using meta_window_get_work_area_current_monitor
instead of meta_window_get_work_area_all_monitors
in handle_move_to_corner_backend
function in src/core/keybindings.c
file.