mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
libinput: support <dragLock>sticky<dragLock> and enable it by default
It is recommended by libinput: https://lists.freedesktop.org/archives/wayland-devel/2024-November/043860.html
This commit is contained in:
parent
cc84cee75b
commit
22d319cce8
5 changed files with 26 additions and 6 deletions
|
|
@ -771,6 +771,16 @@ fill_libinput_category(char *nodename, char *content, struct parser_state *state
|
|||
? LIBINPUT_CONFIG_DRAG_ENABLED
|
||||
: LIBINPUT_CONFIG_DRAG_DISABLED;
|
||||
} else if (!strcasecmp(nodename, "dragLock")) {
|
||||
if (!strcasecmp(content, "sticky")) {
|
||||
#if HAVE_LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY
|
||||
state->current_libinput_category->drag_lock =
|
||||
LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY;
|
||||
#else
|
||||
wlr_log(WLR_ERROR, "<dragLock>sticky</dragLock> is"
|
||||
" only supported in libinput >= 1.27");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
int ret = parse_bool(content, -1);
|
||||
if (ret < 0) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue