Skip to content

Force layer-shell commit after configure#5131

Open
rmt wants to merge 1 commit into
Alexays:masterfrom
rmt:master
Open

Force layer-shell commit after configure#5131
rmt wants to merge 1 commit into
Alexays:masterfrom
rmt:master

Conversation

@rmt

@rmt rmt commented Jun 15, 2026

Copy link
Copy Markdown

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-shell times out waiting for the initial configure:

   Timed out waiting for initial .configure

In observed cases, the compositor may still send the configure immediately afterwards and Waybar logs:

Bar configured (width: ..., height: ...) for output: ...

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:

meson compile -C build

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.

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