interactive: Make window snapping with mouse more intuitive

1. Prevent window snapping triggered by mouse from moving the window
 into the adjacent output.
2. Make the coordinates used to check whether window snapping is
 triggered relative to the output the cursor is at, not the output the
 view is belonging to. This allows users to grab a tiled window and move
 it into another output or tile it again in another output in a single
 drag.
This commit is contained in:
tokyo4j 2023-11-07 14:43:53 +09:00 committed by Johan Malm
parent 29a228674b
commit 9a8a2905ad
4 changed files with 36 additions and 31 deletions

View file

@ -388,7 +388,8 @@ void view_adjust_for_layout_change(struct view *view);
void view_move_to_edge(struct view *view, enum view_edge direction, bool snap_to_windows);
void view_grow_to_edge(struct view *view, enum view_edge direction);
void view_shrink_to_edge(struct view *view, enum view_edge direction);
void view_snap_to_edge(struct view *view, enum view_edge direction, bool store_natural_geometry);
void view_snap_to_edge(struct view *view, enum view_edge direction,
bool across_outputs, bool store_natural_geometry);
void view_snap_to_region(struct view *view, struct region *region, bool store_natural_geometry);
void view_move_to_front(struct view *view);