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

@ -891,6 +891,24 @@ situation.
can be caused by *<margin>* settings or exclusive layer-shell clients
such as panels.
## MENU
```
<menu>
<ignoreButtonReleasePeriod>250</ignoreButtonReleasePeriod>
</menu>
```
*<menu><ignoreButtonReleasePeriod>*
How long (in milliseconds) the initial button release event is ignored
for. The reason for this logic and behaviour is to avoid a fast
press-move-release sequence indended to just open the menu resulting in
the closure of the menu or the selection of (typically the first) menu
item. This behaviour only affects the first button-release. It is not
anticipated that most users will want to change this, but the config
option has been exposed for unusual use-cases. It is equivalent to
Openbox's `<hideDelay>`. Default is 250 ms.
## ENVIRONMENT VARIABLES
*XCURSOR_THEME* and *XCURSOR_SIZE* are supported to set cursor theme

View file

@ -586,4 +586,7 @@
</windowRules>
-->
<menu>
<ignoreButtonReleasePeriod>250</ignoreButtonReleasePeriod>
</menu>
</labwc_config>