fix(bar): force commit for occluded surfaces

All the mode or visibility changes require `wl_surface_commit` to be
applied. gtk-layer-shell will attempt to force GTK to commit, but may
fail if the surface has stopped receiving frame callbacks[^1].
Thus, we could get stuck in a state where the bar is hidden and unable
to regain visibility.

To address this, a new API has been added to gtk-layer-shell,
`gtk_layer_try_force_commit`, which does `wl_surface_commit` with the
necessary safety checks to avoid corrupting GTK internal state.

Note: this change bumps gtk-layer-shell requirement to 0.9.0.

[^1]: https://github.com/wmww/gtk-layer-shell/issues/185
This commit is contained in:
Aleksei Bavshin
2024-08-17 21:55:28 -07:00
parent 4a6af0da99
commit 7b23d58684
2 changed files with 9 additions and 1 deletions

View File

@ -106,7 +106,7 @@ if libsndio.found()
endif
endif
gtk_layer_shell = dependency('gtk-layer-shell-0', version: ['>=0.6.0'],
gtk_layer_shell = dependency('gtk-layer-shell-0', version: ['>=0.9.0'],
default_options: ['introspection=false', 'vapi=false'],
fallback: ['gtk-layer-shell', 'gtk_layer_shell'])
systemd = dependency('systemd', required: get_option('systemd'))