Files
Waybar/include/modules
Tobias Brox 13469a8847 fix(keyboard-state): fix segfault on device hotplug
The keyboard-state module crashes with SIGSEGV in libinput_device_ref
when a new input device appears in /dev/input/.

Three bugs fixed:

1. Missing NULL check: tryAddDevice() calls libinput_path_add_device()
   which returns NULL on failure, then immediately passes the result to
   libinput_device_ref() without checking.  On laptops, virtual input
   devices (power buttons, lid switch, etc.) appear and disappear in
   /dev/input/ triggering the hotplug handler; if libinput can't open
   one of these, the NULL return causes the segfault.

2. Missing cleanup on device removal: The IN_DELETE handler erased
   devices from the map without calling libinput_path_remove_device(),
   leaving dangling pointers in the libinput context.

3. Thread safety: libinput_devices_ was accessed from 3 threads
   (main/GTK, libinput_thread_, hotplug_thread_) without any mutex.

Fixes #4851

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:57:23 +01:00
..
2026-02-04 09:24:14 +01:00
2026-02-04 09:24:14 +01:00
2023-07-04 23:05:26 +02:00
2026-02-04 09:24:14 +01:00
2026-02-04 09:24:14 +01:00
2026-02-04 09:24:14 +01:00
2026-02-04 09:24:14 +01:00
2026-02-04 09:24:14 +01:00
2026-02-04 09:24:14 +01:00
2023-10-15 17:52:12 -03:00
2026-02-08 13:32:41 +01:00
2023-10-17 19:29:06 +02:00
2024-02-19 23:10:10 +01:00
2026-02-04 09:24:14 +01:00
2025-06-22 10:01:36 +02:00
2023-03-02 16:57:32 +03:00
2025-08-16 15:34:43 -07:00
2023-03-02 16:57:32 +03:00
2026-02-04 09:24:14 +01:00
2023-10-17 19:29:06 +02:00
2023-03-02 16:57:32 +03:00
2023-03-02 16:57:32 +03:00
2026-02-04 09:24:14 +01:00
2026-02-04 09:24:14 +01:00
2023-03-02 16:57:32 +03:00