mirror of
https://github.com/labwc/labwc.git
synced 2026-05-03 06:47:22 -04:00
rcxml: add raiseOnFocusDelay option
Add a new <focus><raiseOnFocusDelay> element accepting an integer in milliseconds. The default of 0 preserves the current behavior (raise immediately when raiseOnFocus is enabled). The new field is carried as uint32_t raise_on_focus_delay_ms on struct rcxml. This commit only adds the parser and default; the actual delay logic follows in a subsequent commit.
This commit is contained in:
parent
70e3173f99
commit
7b3f37725f
2 changed files with 5 additions and 0 deletions
|
|
@ -90,6 +90,7 @@ struct rcxml {
|
||||||
bool focus_follow_mouse;
|
bool focus_follow_mouse;
|
||||||
bool focus_follow_mouse_requires_movement;
|
bool focus_follow_mouse_requires_movement;
|
||||||
bool raise_on_focus;
|
bool raise_on_focus;
|
||||||
|
uint32_t raise_on_focus_delay_ms;
|
||||||
|
|
||||||
/* theme */
|
/* theme */
|
||||||
char *theme_name;
|
char *theme_name;
|
||||||
|
|
|
||||||
|
|
@ -1195,6 +1195,9 @@ entry(xmlNode *node, char *nodename, char *content)
|
||||||
set_bool(content, &rc.focus_follow_mouse_requires_movement);
|
set_bool(content, &rc.focus_follow_mouse_requires_movement);
|
||||||
} else if (!strcasecmp(nodename, "raiseOnFocus.focus")) {
|
} else if (!strcasecmp(nodename, "raiseOnFocus.focus")) {
|
||||||
set_bool(content, &rc.raise_on_focus);
|
set_bool(content, &rc.raise_on_focus);
|
||||||
|
} else if (!strcasecmp(nodename, "raiseOnFocusDelay.focus")) {
|
||||||
|
long val = strtol(content, NULL, 10);
|
||||||
|
rc.raise_on_focus_delay_ms = val > 0 ? (uint32_t)val : 0;
|
||||||
} else if (!strcasecmp(nodename, "doubleClickTime.mouse")) {
|
} else if (!strcasecmp(nodename, "doubleClickTime.mouse")) {
|
||||||
long doubleclick_time_parsed = strtol(content, NULL, 10);
|
long doubleclick_time_parsed = strtol(content, NULL, 10);
|
||||||
if (doubleclick_time_parsed > 0) {
|
if (doubleclick_time_parsed > 0) {
|
||||||
|
|
@ -1530,6 +1533,7 @@ rcxml_init(void)
|
||||||
rc.focus_follow_mouse = false;
|
rc.focus_follow_mouse = false;
|
||||||
rc.focus_follow_mouse_requires_movement = true;
|
rc.focus_follow_mouse_requires_movement = true;
|
||||||
rc.raise_on_focus = false;
|
rc.raise_on_focus = false;
|
||||||
|
rc.raise_on_focus_delay_ms = 0;
|
||||||
|
|
||||||
rc.doubleclick_time = 500;
|
rc.doubleclick_time = 500;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue