[wip] Add ToggleSnapToEdge

This allows to replace the usual maximize behavior that does not
respect gaps with SnapToEdge direction="center" which does respect
gaps. It can be bound to the SSD Maximize button and Title double
click handlers in rc.xml.

Missing:
- [ ] docs
- [ ] some enum for `<snapping topMaximize="yes|no">`
      like `yes|no|respect_gaps`

Ref: https://www.reddit.com/r/labwc/comments/1brvsj8/
This commit is contained in:
Consolatis 2024-03-31 04:52:30 +02:00
parent d68376f2ac
commit c2ddb1530d
3 changed files with 29 additions and 2 deletions

View file

@ -461,6 +461,7 @@ 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 across_outputs, bool store_natural_geometry);
void view_toggle_snap_to_edge(struct view *view, enum view_edge direction);
void view_snap_to_region(struct view *view, struct region *region, bool store_natural_geometry);
void view_move_to_output(struct view *view, struct output *output);