mirror of
https://github.com/labwc/labwc.git
synced 2025-11-30 06:59:52 -05:00
action: allow SnapToEdge to combine two cardinal directions
This patch adds `combine` argument to (Toggle)SnapToEdge actions. This allows to snap a window to e.g. up-left by running two actions: - `<action name="SnapToEdge" direction="left" combine="yes" />` - `<action name="SnapToEdge" direction="up" combine="yes" />` Then running `<action name="SnapToEdge" direction="down" combine="yes" />` snaps it to left again. This behavior is almost the same as KWin, except that snapping a up-right-tiled window to right doesn't move it to the right-adjacent output, but makes it right-tiled first.
This commit is contained in:
parent
af6a0df231
commit
2ac48116e1
5 changed files with 68 additions and 26 deletions
|
|
@ -260,9 +260,8 @@ snap_to_edge(struct view *view)
|
|||
view_maximize(view, VIEW_AXIS_BOTH,
|
||||
/*store_natural_geometry*/ false);
|
||||
} else {
|
||||
view_snap_to_edge(view, edge,
|
||||
/*across_outputs*/ false,
|
||||
/*store_natural_geometry*/ false);
|
||||
view_snap_to_edge(view, edge, /*across_outputs*/ false,
|
||||
/*combine*/ false, /*store_natural_geometry*/ false);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue