linux: Fix XWayland resize deadlock and improve its behaviour#8
Open
tinylucid wants to merge 1 commit into
Open
linux: Fix XWayland resize deadlock and improve its behaviour#8tinylucid wants to merge 1 commit into
tinylucid wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.