Using TitleBar component may freeze GUI input on Linux
Description: On Linux (XFCE + LightDM + X11), right-clicking the TitleBar component in programs causes the graphical session’s input system to become completely unresponsive.
Observed behavior:
-
Mouse pointer still moves, but clicks have no effect
-
Keyboard input is completely unresponsive
-
System is not fully locked (system clock keeps running, and TTY can be accessed via Ctrl+Alt+F2)
-
Killing the application from TTY does not restore GUI input
-
Only systemctl restart lightdm restores normal input
Reproduction rate and scope:
-
Right-clicking TitleBar triggers freeze 100% of the time
-
Occurs not only in my own programs but also in official examples (e.g., dock and other examples using TitleBar)
-
Suspected cause may relate to X11 event blocking, XFWM (XFCE window manager) input handling, or GPU/compositor event issues
Attempted but ineffective recovery:
- Killing the application process GUI input remains frozen; LightDM restart is required
System information:
- OS: Linux 6.16.8-amd64
- Desktop Environment: XFCE
- Display Server: X11
- Display Manager: LightDM
- Kernel: 6.16.8, x86_64
- gpui version: 0.2.2
- gpui_component version: 0.4.0-preview0
- Rust version: rustc 1.91.0 (2025-10-28)
@huacnlee
Hello, this issue is quite serious — could you please take a look?
It occurs not only in my own application, but also in the examples and even in Longbridge Pro.
It’s very easy to accidentally right-click on the title bar, and once that happens, the window becomes unresponsive.
How about the Zed?
@huacnlee
Zed does not have this issue.
Maybe caused by this:
https://github.com/longbridge/gpui-component/blob/4e0f9af7892f0a90401ff684657c15c8d4309fd0/crates/ui/src/title_bar.rs#L373-L380
@J2ane Would please try this PR:
https://github.com/longbridge/gpui-component/pull/1710
@huacnlee
The stuttering issue still occurs.
Great! Right-clicking works normally now.👍👍👍
Previously, there was no response at all and it would freeze the entire desktop, preventing normal input. Now, the right-click menu displays properly and no longer causes freezing.