Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix resizing of the bar with gtk-layer-shell #824

Merged
merged 2 commits into from
Aug 15, 2020

Conversation

alebastr
Copy link
Contributor

In the hindsight, it wasn't a good idea to have one set of GTK event handlers for both code paths. Took me a while to remember which code is needed for gtk-layer-shell and which one is for bare layer-surface. Apparently Bar::onConfigure wasn't passing the right values to setExclusiveZone because it was written with assumption that layerSurfaceHandleConfigure already done everything required.


At some point GTK stopped listening to resize/set_size_request if the requested size is insufficient. This is now causing occasional bar size changes and warnings in the log for both code paths.
This would also cause an interesting behavior if gtk-layer-shell is disabled and the bar height is a fixed value from the config file; the bar would expand according to a content size, but the exclusive zone size would stay as configured.

Fixes: #799 (only for gtk-layer-shell).
Also fixes xdg_wm_base.version mismatch warning via gtk-layer-shell 0.3.0 update.

Cleanly separate resizing logic for gtk-layer-shell and manually managed
layer surface code.
Fixes warning about xdg_wm_base.version mismatch.
Fixes potential crash when GTK does not expect wl_surface to be committed.
@Alexays
Copy link
Owner

Alexays commented Aug 15, 2020

Perfect as always!
Definitely cleaner by splitting the event handlers
Thanks!

@Alexays Alexays merged commit 0cf3b25 into Alexays:master Aug 15, 2020
@alebastr alebastr deleted the gls-resize branch August 15, 2020 17:21
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.

If bar height gets very large at some point it never liberates the reserved space
2 participants