Files
kitty/glfw
copilot-swe-agent[bot] 9b9bfeb02d Fix XI_BadDevice crash on USB device disconnect (#9723)
When a USB HID device (keyboard/mouse) is disconnected, X11 fires an
XI_HierarchyChanged event, which triggers read_xi_scroll_devices().
That function calls XIGetProperty() on devices from XIQueryDevice().
There is a race condition: if a device is removed between these calls,
X11 generates an XI_BadDevice error. Without a custom error handler, the
default X11 handler calls exit(), killing kitty.

Fix: wrap the device query loop in read_xi_scroll_devices() with
_glfwGrabErrorHandlerX11() / _glfwReleaseErrorHandlerX11() so that any
XI_BadDevice error is captured by kitty's own handler rather than the
default fatal one.

Fixes #9723
Fixes #9724
2026-03-22 07:52:49 +05:30
..
2024-02-25 09:57:30 +05:30
2026-03-21 08:41:47 +05:30
2020-06-09 20:18:07 +05:30
2021-09-26 11:17:54 +05:30
2019-12-08 22:37:47 +05:30
2026-02-23 07:44:58 +05:30
2023-06-14 03:39:53 +06:00