Skip to content

linux: Fix XWayland resize deadlock and improve its behaviour#8

Open
tinylucid wants to merge 1 commit into
cdacamar:mainfrom
tinylucid:main
Open

linux: Fix XWayland resize deadlock and improve its behaviour#8
tinylucid wants to merge 1 commit into
cdacamar:mainfrom
tinylucid:main

Conversation

@tinylucid

@tinylucid tinylucid commented Jun 30, 2026

Copy link
Copy Markdown

App was locking up on CachyOS running latest KDE 6.7.1 on Wayland, cause of X11's _NET_WM_SYNC_REQUEST and _NET_WM_SYNC_REQUEST_COUNTER atomics.

https://bugs.kde.org/show_bug.cgi?id=486464

I tried to keep those on native X11 implementation and just avoid them on xwayland, since I had no way of testing on X11.

Also I tried to make resize responsiveness more reactive, but maybe just removing aforementioned atomic would do the enough. On my machine this worked. Point of this PR was to give directions and inspiration to creator in order to implement proper solution for Fred text editor.

Detect when we are running in XWayland and avoid using
_NET_WM_SYNC_REQUEST which deadlocks on KWin/XWayland
https://bugs.kde.org/show_bug.cgi?id=486464.

Includ X11 connection FD to the existing epoll set so resize events
return to the main loop immediately instead of blocking until the next
frametick.

Register the X11 fd with the existing epoll set so resize events wake
the frame loop immediately rather than blocking until the frame timer
fires.

Defer XSyncSetCounter to swap_buffers so it runs after rendering.

Fix ClientMessage guard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant