Switch layer from top to overlay #81

Open
opened 8 months ago by mars · 10 comments
mars commented 8 months ago

In sway if you open fuzzel in a workspace that's in fullscreen mode, it opens behind the current window.

In sway if you open fuzzel in a workspace that's in fullscreen mode, it opens behind the current window.
Owner

Fuzzel is a "layer-shell" application (a wlroots custom Wayland protocol), where a layer can be positioned in the "background", in the "bottom", at the "top", or as an "overlay".

Fuzzel currently uses "top". We could go with "overlay". However, overlays currently go over the lockscreen.

There's a new lock-screen protocol in the works, which will fix this. I think it makes sense for fuzzel to keep using "top" until that protocol is done and in use. At that time we can switch to "overlay".

Fuzzel is a "layer-shell" application (a wlroots custom Wayland protocol), where a layer can be positioned in the "background", in the "bottom", at the "top", or as an "overlay". Fuzzel currently uses "top". We _could_ go with "overlay". However, overlays currently go over the lockscreen. There's a new lock-screen protocol in the works, which will fix this. I think it makes sense for fuzzel to keep using "top" until that protocol is done and in use. At that time we can switch to "overlay".
Owner
Related: https://github.com/swaywm/swaylock/issues/107
Poster

Oh I didn't know that, I don't use fullscreen that often, that must be why I haven't run into this. Yes I definitely wouldn't want it on top of the screen lock. Please feel free to close or keep this open (as a reminder to eventually switch to overlay). Fantastic app btw, many thanks.

Oh I didn't know that, I don't use fullscreen that often, that must be why I haven't run into this. Yes I definitely wouldn't want it on top of the screen lock. Please feel free to close or keep this open (as a reminder to eventually switch to overlay). Fantastic app btw, many thanks.
dnkl changed title from fuzzel open behind fullscreen window in sway to Switch layer from top to overlay 7 months ago
dnkl added the
enhancement
label 7 months ago

I'm noting that Rofi's Wayland fork also had a problem displaying under fullscreen windows and they figured out a way to fix it. That issue is here:
https://github.com/lbonn/rofi/issues/12

I'm noting that Rofi's Wayland fork also had a problem displaying under fullscreen windows and they figured out a way to fix it. That issue is here: https://github.com/lbonn/rofi/issues/12
Owner

I'm noting that Rofi's Wayland fork also had a problem displaying under fullscreen windows and they figured out a way to fix it

By switching from "top" to "overlay", just as discussed here.

The difference is there was no other solution in sight when they made their decision. Now there is: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3414. I think we can afford to wait, as this is not a critical bug (though obviously annoying).

For the impatient:

diff --git a/wayland.c b/wayland.c
index 84cedfc..13f4824 100644
--- a/wayland.c
+++ b/wayland.c
@@ -1751,7 +1751,7 @@ wayl_init(struct fdm *fdm,
     wayl->layer_surface = zwlr_layer_shell_v1_get_layer_surface(
         wayl->layer_shell, wayl->surface,
         wayl->monitor != NULL ? wayl->monitor->output : NULL,
-        ZWLR_LAYER_SHELL_V1_LAYER_TOP, "launcher");
+        ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY, "launcher");
 
     if (wayl->layer_surface == NULL) {
         LOG_ERR("failed to create layer shell surface");
> I'm noting that Rofi's Wayland fork also had a problem displaying under fullscreen windows and they figured out a way to fix it By switching from "top" to "overlay", just as discussed here. The difference is there was no other solution in sight when they made their decision. Now there is: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3414. I think we can afford to wait, as this is not a critical bug (though obviously annoying). For the impatient: ```diff diff --git a/wayland.c b/wayland.c index 84cedfc..13f4824 100644 --- a/wayland.c +++ b/wayland.c @@ -1751,7 +1751,7 @@ wayl_init(struct fdm *fdm, wayl->layer_surface = zwlr_layer_shell_v1_get_layer_surface( wayl->layer_shell, wayl->surface, wayl->monitor != NULL ? wayl->monitor->output : NULL, - ZWLR_LAYER_SHELL_V1_LAYER_TOP, "launcher"); + ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY, "launcher"); if (wayl->layer_surface == NULL) { LOG_ERR("failed to create layer shell surface"); ```

For those, who are not only impatient, but lazy as well:

git clone https://codeberg.org/isti115/fuzzel
cd fuzzel
makepkg -si
For those, who are not only impatient, but lazy as well: ```powershell git clone https://codeberg.org/isti115/fuzzel cd fuzzel makepkg -si ```
Owner

The wlroots MR has been merged, and if I'm not mistaken, will be available in wlroots-0.16.0.

The wlroots MR has been merged, and if I'm not mistaken, will be available in wlroots-0.16.0.

Looks like this is getting stalled by Sway, which is now implementing support on top another big feature, the "scene graph":

https://github.com/swaywm/sway/pull/6879#issuecomment-1069751188

That seems likely to cause further delays.

Looks like this is getting stalled by Sway, which is now implementing support on top another big feature, the "scene graph": https://github.com/swaywm/sway/pull/6879#issuecomment-1069751188 That seems likely to cause further delays.

I'm temporarily using this a checked out directory after applying the patch above:

meson --reconfigure --buildtype=release -Dsvg-backend=nanosvg src
makepkg -si
I'm temporarily using this a checked out directory after applying the patch above: ``` meson --reconfigure --buildtype=release -Dsvg-backend=nanosvg src makepkg -si ```
Owner

Sway MR has been merged. Thus, we can do the switch after the next Sway release (1.8).

Sway MR has been merged. Thus, we can do the switch after the next Sway release (1.8).
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: dnkl/fuzzel#81
Loading…
There is no content yet.