My libinput touchpad doesn't have an enabled atom so doing
*m_atoms[QLatin1Literal("enabled")].data()
and then using that atom ends up with a crash
So instead of asking the atom out, just pass the atom to compare in
My libinput touchpad doesn't have an enabled atom so doing
*m_atoms[QLatin1Literal("enabled")].data()
and then using that atom ends up with a crash
So instead of asking the atom out, just pass the atom to compare in
Unfortunately i can't really really reproduce the crash, it just happens every other day, so i can only say "this code is safer and should crash less"
No Linters Available |
No Unit Test Coverage |
Buildable 12988 | |
Build 13006: arc lint + arc unit |
The other question is if "enabled" was ever the correct atom to check for
In my system the atoms names are
libinput Send Events Mode Enabled
libinput Send Events Mode Enabled Default
libinput Send Events Modes Available
libinput Left Handed Enabled Default
libinput Left Handed Enabled
libinput Disable While Typing Enabled Default
libinput Disable While Typing Enabled
libinput Middle Emulation Enabled Default
libinput Middle Emulation Enabled
libinput Tapping Enabled
libinput Tapping Enabled Default
libinput Tapping Button Mapping Default
libinput Tapping Button Mapping Enabled
libinput Tapping Drag Enabled Default
libinput Tapping Drag Enabled
libinput Tapping Drag Lock Enabled Default
libinput Tapping Drag Lock Enabled
libinput Accel Speed Default
libinput Accel Speed
libinput Accel Profiles Available
libinput Accel Profile Enabled Default
libinput Accel Profile Enabled
libinput Natural Scrolling Enabled Default
libinput Natural Scrolling Enabled
libinput Horizontal Scroll Enabled
libinput Scroll Methods Available
libinput Scroll Method Enabled Default
libinput Scroll Method Enabled
libinput Button Scrolling Button Default
libinput Button Scrolling Button
libinput Click Methods Available
libinput Click Method Enabled Default
libinput Click Method Enabled
I'm fairly sure we were checking for libinput Tapping Enabled atom in the past, and so does GNOME: https://gitlab.gnome.org/GNOME/gtk/blob/master/gdk/x11/gdkdevicemanager-xi2.c#L410
Whoops... It should be "libinput Send Events Mode Enabled" or LIBINPUT_PROP_SENDEVENTS_ENABLED rather than enabled. my bad ;) , Just replacing "enabled" fixes the issue :D