mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
overlay: add snap-to-edge overlay (PR #1652)
...and unify region overlay and snap-to-edge overlay into overlay.c. Snap-to-edge overlay is delayed for 500ms to prevent flickering when the view is dragged from an output to another (demo in discussion labwc#1613). This also fixes a bug that region overlay is not shown when a modifier key is re-pressed.
This commit is contained in:
parent
67669dcf1e
commit
5cc0757390
16 changed files with 361 additions and 152 deletions
|
|
@ -907,6 +907,12 @@ entry(xmlNode *node, char *nodename, char *content)
|
|||
rc.window_edge_strength = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "range.snapping")) {
|
||||
rc.snap_edge_range = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "enabled.preview.snapping")) {
|
||||
set_bool(content, &rc.snap_preview_enabled);
|
||||
} else if (!strcasecmp(nodename, "inner.delay.preview.snapping")) {
|
||||
rc.snap_preview_delay_inner = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "outer.delay.preview.snapping")) {
|
||||
rc.snap_preview_delay_outer = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "topMaximize.snapping")) {
|
||||
set_bool(content, &rc.snap_top_maximize);
|
||||
} else if (!strcasecmp(nodename, "notifyClient.snapping")) {
|
||||
|
|
@ -1184,6 +1190,9 @@ rcxml_init(void)
|
|||
rc.window_edge_strength = 20;
|
||||
|
||||
rc.snap_edge_range = 1;
|
||||
rc.snap_preview_enabled = true;
|
||||
rc.snap_preview_delay_inner = 500;
|
||||
rc.snap_preview_delay_outer = 500;
|
||||
rc.snap_top_maximize = true;
|
||||
rc.snap_tiling_events_mode = LAB_TILING_EVENTS_ALWAYS;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue