resistance: add window-edge resistance for interactive moves/resizes

This commit is contained in:
Andrew J. Hesford 2024-01-20 21:59:46 -05:00 committed by Andrew J. Hesford
parent f73e9ded1c
commit 57ea197e6c
6 changed files with 199 additions and 138 deletions

View file

@ -807,6 +807,8 @@ entry(xmlNode *node, char *nodename, char *content)
rc.kb_layout_per_window = !strcasecmp(content, "window");
} else if (!strcasecmp(nodename, "screenEdgeStrength.resistance")) {
rc.screen_edge_strength = atoi(content);
} else if (!strcasecmp(nodename, "windowEdgeStrength.resistance")) {
rc.window_edge_strength = atoi(content);
} else if (!strcasecmp(nodename, "range.snapping")) {
rc.snap_edge_range = atoi(content);
} else if (!strcasecmp(nodename, "topMaximize.snapping")) {
@ -1061,6 +1063,7 @@ rcxml_init(void)
rc.kb_numlock_enable = true;
rc.kb_layout_per_window = false;
rc.screen_edge_strength = 20;
rc.window_edge_strength = 20;
rc.snap_edge_range = 1;
rc.snap_top_maximize = true;