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

@ -674,7 +674,9 @@ actions_run(struct view *activator, struct server *server,
if (view) {
/* Config parsing makes sure that direction is a valid direction */
enum view_edge edge = action_get_int(action, "direction", 0);
view_snap_to_edge(view, edge, /*store_natural_geometry*/ true);
view_snap_to_edge(view, edge,
/*across_outputs*/ true,
/*store_natural_geometry*/ true);
}
break;
case ACTION_TYPE_GROW_TO_EDGE: