-
-
Notifications
You must be signed in to change notification settings - Fork 732
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
Fixes for Sway modes and wlr_scene support #3528
Conversation
I have tested that I can reproduce #3512 with the current master branch, and that it is fixed by this pull request. Thank you very much for this fix! |
With this pull request I'm getting a small delay upto one second between toggling bar visibility and it actually showing up on top of fullscreen window. Hiding works fine. |
I think with this pull request there is another issue that is somewhat similar to what @VlctM initially reported in #3211. Here is what I observe with
in
Long story short (maybe not an accurate summary of my observations), waybar is "broken" after launch and until first visibility toggle, and gets broken if it is hidden when a window is in fullscreen mode |
Hm, I can't reproduce the delay, and it shouldn't be directly caused by anything waybar does. |
Not sure what do you mean by "broken after launch", do you expect to start in a hidden state? Visibility changes via Sway IPC events and via SIGUSR1 work slightly differently and aren't really compatible or meant to be used together. SIGUSR1 switches between I suspect that
|
Sway 1.9/River 0.3.5 So I tried to make the smallest config with which that issue is reproducible and discovered that for some reason with only
Waybar fails to change visibility at all over fullscreen window (it's "visible" but underneath).
That "fixes" it somehow. There's a delay, and this time even upto few seconds. That's the log after running waybar:
That's what I get after toggling bar:
It hangs up each time after the first wl_surface#39.commit() |
Then I must have had wrong understanding of how bar visibility is supposed to work in the first place. 😅 |
Hello, @alebastr, thank you for your work and I apologise for only just now being able to respond. I'm the author of #3473 and, after trying your build of waybar, I can attest that it still behaves exactly the same as reported on my original issue: when in hide mode, the bar is hidden until the first press of the key that activates it ($mod, in my case), and then it acts like a clickable overlay mode. So yeah, unfortunately, this doesn't fix this problem |
8a514e5
to
6345aa2
Compare
d623a89
to
a4d31ab
Compare
This fixes a major inconsistency with the swaybar implementation of these modes[^1]. `overlay` layer no longer has security implications due to a wide adoption of `ext-session-lock`, so it's safe to use. Following config will restore the previous behavior: ```json "modes": { "hide": { "layer": "top" }, "overlay": { "layer": "top" } }, ``` [^1]: swaywm/sway@2f7247e
6345aa2
to
b3ebd3b
Compare
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]: wmww/gtk-layer-shell#185
Previous commit should have a better workaround for Alexays#3211. This reverts commit b61ea62.
b3ebd3b
to
45fec7b
Compare
@VlctM it took me a few weeks, but I finally found a single line I had to add to fix the delays. Please, try this branch again. |
Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/71e91c409d1e654808b2621f28a327acfdad8dc2?narHash=sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w%3D' (2024-08-28) → 'github:NixOS/nixpkgs/4f807e8940284ad7925ebd0a0993d2a1791acb2f?narHash=sha256-IiA3jfbR7K/B5%2B9byVi9BZGWTD4VSbWe8VLpp9B/iYk%3D' (2024-09-11)
No delays. Thanks |
Fixes #3211
Fixes #3512 (and a dozen other issues about
overlay
mode not being on top of fullscreen windows)@VlctM, @7ff04da4aa6ac37197e249299066ac30, @srprca, I'd appreciate if you could test this PR.