swaywm / swaylock

Screen locker for Wayland
MIT License
851 stars 202 forks source link

Fullscreen window visible after lock #236

Closed alextsits closed 2 years ago

alextsits commented 2 years ago

I use alacritty as my terminal emulator, and sway as window manager.

I noticed if alacritty is fullscreen when I start swaylock, the alacritty window is visible after locking, although, the window does not refresh, and it does not get any input.

Alacritty version: 0.11.0.1975.g5c51d528-1 Swaylock version: 1.6.r6.gfad5bc2-1

I'm not sure whose bug it is, or if it's reproducible with other apps. Let me know if there is any other info I could provide.

alextsits commented 2 years ago

I just noticed that this happens for most (if not all) xwayland applications as well.

Steps to reproduce: 1) Start any xwayland application 2) Make its window fullscreen 3) Start swaylock

Expected result: 1) Screen turns black, with the usual ring appearing on input

Actual result: 1) The fullscreen window remains visible, albeit "frozen".

alextsits commented 2 years ago

I need to note that this is not an xwayland-specific bug. It happens with alacritty as well, running in native wayland. I made sure by disabling xwayland support in sway and reproducing with alacritty.

kennylevinsen commented 2 years ago

what version of sway? Master with the newly landed ext-session-lock-v1 support?

alextsits commented 2 years ago

@kennylevinsen yes. The exact sway version is r6918.c85d9af2b-1. But I'm not sure how ext-session-lock-v1 works. Is it something I need to configure on my side for it to work? Does it work out of the box? I haven't done anything to enable it explicitly.

alextsits commented 2 years ago

@kennylevinsen I confirm that ext-session-lock-v1 is enabled. I tested by starting swaylock and then kill -9 it from a tty. The session remained locked. This wouldn't be the case if ext-session-lock-v1 wasn't enabled.

stromnet commented 2 years ago

+1 here:

Just bumped sway from r6910.2dace6b8-1 -> r6918.c85d9af2-1, wlroots 0.16.0.r5457.640f3b9f-1 -> 0.16.0.r5479.fa9b6100-1, and chromium 100.0.4896.127-2 -> 101.0.4951.64-1 (and alot of other things). Swaylock 1.6-1.

On one output I have a chromium in fullscreen. When I lock with swaylock, that output is no longer hidden. I cannot interact with it, it seems, but the contents is still there. And it's not "frozen" as in frozen image, it's rendered & updated as if unlocked.

No for_window customizations at all for the chromium windows. Launched with env LANG=en_UK /usr/bin/chromium %U'

From swaymsg get_tree it seems it's using xwayland.

danieldg commented 2 years ago

This is a sway bug; the ext-session-lock surface is not being considered when determining if direct scan-out should be used.

https://github.com/swaywm/sway/pull/6844 reworks the rendering path and will fix this issue.

stromnet commented 2 years ago

Resolved with above fix, thanks!