9b9bfeb02d43b4f6d2946b8ba3455b9062dd1aac
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
= kitty - the fast, feature-rich, cross-platform, GPU based terminal If you live in the terminal, *kitty* is made for **you**! See https://sw.kovidgoyal.net/kitty/[the kitty website]. image:https://github.com/kovidgoyal/kitty/workflows/CI/badge.svg["Build status", link="https://github.com/kovidgoyal/kitty/actions?query=workflow%3ACI"] https://sw.kovidgoyal.net/kitty/faq/[Frequently Asked Questions] To ask other questions about kitty usage, use either the https://github.com/kovidgoyal/kitty/discussions/[discussions on GitHub] or the https://www.reddit.com/r/KittyTerminal[Reddit community] Packaging status in various repositories: image:https://repology.org/badge/vertical-allrepos/kitty-terminal.svg?columns=3&header=kitty["Packaging status", link="https://repology.org/project/kitty-terminal/versions"]
Description
Languages
Python
38.4%
C
28%
Go
26.2%
Objective-C
5.7%
Shell
1.1%
Other
0.6%