mirror of
https://github.com/labwc/labwc.git
synced 2025-11-30 06:59:52 -05:00
overlay: take into account <core><gap> for edge overlay
This also deduplicates get_edge_snap_box() in interactive.c and view_get_edge_snap_box() in view.c.
This commit is contained in:
parent
ca8d98e80f
commit
38e57891b5
5 changed files with 23 additions and 35 deletions
|
|
@ -195,11 +195,7 @@ edge_from_cursor(struct seat *seat, struct output **dest_output)
|
|||
} else if (cursor_x >= area->x + area->width - snap_range) {
|
||||
return VIEW_EDGE_RIGHT;
|
||||
} else if (cursor_y <= area->y + snap_range) {
|
||||
if (rc.snap_top_maximize) {
|
||||
return VIEW_EDGE_CENTER;
|
||||
} else {
|
||||
return VIEW_EDGE_UP;
|
||||
}
|
||||
return VIEW_EDGE_UP;
|
||||
} else if (cursor_y >= area->y + area->height - snap_range) {
|
||||
return VIEW_EDGE_DOWN;
|
||||
} else {
|
||||
|
|
@ -223,7 +219,7 @@ snap_to_edge(struct view *view)
|
|||
* Don't store natural geometry here (it was
|
||||
* stored already in interactive_begin())
|
||||
*/
|
||||
if (edge == VIEW_EDGE_CENTER) {
|
||||
if (edge == VIEW_EDGE_UP && rc.snap_top_maximize) {
|
||||
/* <topMaximize> */
|
||||
view_maximize(view, VIEW_AXIS_BOTH,
|
||||
/*store_natural_geometry*/ false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue