Force layer-shell commit after configure#5131
Open
rmt wants to merge 1 commit into
Open
Conversation
Assisted-by: pi:gpt-5.5
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.
Summary
This adds a defensive layer-shell commit after Waybar receives configure events, plus a one-shot startup idle recovery after
show_all().The goal is to recover from cases where
gtk-layer-shelltimes out waiting for the initial configure:In observed cases, the compositor may still send the configure immediately afterwards and Waybar logs:
but the bar can remain invisible. Forcing a draw/commit after configure gives GTK/gtk-layer-shell another opportunity to submit the visible surface state.
Related work
This is related to, but different from, PR #4984:
That PR is probably the more correct/root-cause fix for the gtk-layer-shell 0.10.1 startup timeout, because it avoids creating bars directly from output .done handling and instead batches/defer bar creation.
This PR is a smaller defensive recovery path: even if a configure arrives late after the initial wait timed out, Waybar forces a layer-shell commit so the configured bar is more likely to become visible.
The two approaches seem complementary to me.
While my own setup (MangoWM) is different, related issues likely include:
It would be good if author's of above issues could test this patch too.
Testing
Built successfully with:
Locally, this improved the startup case where Waybar logged the initial configure timeout followed by a successful Bar configured ... message but did not display. I also haven't seen waybar disappearing again after this patch.
Note: I used the pi coding agent with gpt-5.5 to dig into this issue - the patch seems straight-forward, and it also solves my problem.