mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
rcxml: Make sure a default libinput category always exists
Previously, if rc.xml defined only non-default libinput categories, no default category was created. This meant that configure_libinput() might totally skip configuring some devices even with default settings, like tap-to-click. Fix this by making sure that a default category is always created.
This commit is contained in:
parent
500eddbe88
commit
41a4176b17
4 changed files with 26 additions and 6 deletions
10
src/seat.c
10
src/seat.c
|
|
@ -75,14 +75,16 @@ configure_libinput(struct wlr_input_device *wlr_input_device)
|
|||
} else if (device_category->type == current_type) {
|
||||
dc = device_category;
|
||||
} else if (device_category->type == DEFAULT_DEVICE && !dc) {
|
||||
/* Match default category as last-resort */
|
||||
dc = device_category;
|
||||
}
|
||||
}
|
||||
|
||||
if (!dc) {
|
||||
wlr_log(WLR_INFO, "Skipping libinput configuration for device");
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* The above logic should have always matched SOME category
|
||||
* (the default category if none other took precedence)
|
||||
*/
|
||||
assert(dc);
|
||||
|
||||
if (libinput_device_config_tap_get_finger_count(libinput_dev) <= 0) {
|
||||
wlr_log(WLR_INFO, "tap unavailable");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue