cursor: implement <menu><ignoreButtonReleasePeriod>

Addresses UX degradation introduced by commit 1d3ed457.

This prevents clicks with small movement with the intention of opening
the menu from unexpectedly closing the menu or selecting a menu item.
This commit is contained in:
tokyo4j 2024-04-26 09:03:17 +09:00 committed by Hiroaki Yamamoto
parent 96d5d80be2
commit 4b6efb7307
5 changed files with 47 additions and 6 deletions

View file

@ -1034,6 +1034,8 @@ entry(xmlNode *node, char *nodename, char *content)
} else {
wlr_log(WLR_ERROR, "Missing 'button' argument for tablet button mapping");
}
} else if (!strcasecmp(nodename, "ignoreButtonReleasePeriod.menu")) {
rc.menu_ignore_button_release_period = atoi(content);
}
}
@ -1238,6 +1240,8 @@ rcxml_init(void)
rc.workspace_config.popuptime = INT_MIN;
rc.workspace_config.min_nr_workspaces = 1;
rc.menu_ignore_button_release_period = 250;
}
static void