-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement ext-session-lock-v1 #6879
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch! Here's a first round of comments.
294c069
to
0149515
Compare
c2645e0
to
68a3c06
Compare
68a3c06 adds support for output resolution changes. |
https://github.com/danieldg/sway/tree/lock-scene-graph is a rebase of this on top of #6844 - once that is merged, I'll update the branch this request references. |
Just wanted to note that I'm daily-driving https://github.com/danieldg/sway/tree/lock-scene-graph (ae6ff23 right now) with wlroots d3a2ea and it works without any problems at all as far as I've noticed. |
Thank you @danieldg |
I've been using the same version for a while and notice a mildly annoying issue. After unlocking the screen, no window has focus. Steps to repro:
At this point, the terminal is unfocused. It seems the only ways to focus it are:
|
See if the latest commit on that branch fixes this for you; it more closely matches how the layer-shell/input-manager locking works. |
output_damage_surface(surf->output, 0, 0, surf->surface, false); | ||
} | ||
|
||
static void handle_output_mode(struct wl_listener *listener, void *data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logical size of the output can change even if the mode doesn't, for instance when the scale or transform changes. We should listen for output.events.commit
instead and check the committed
bitfield in the event struct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to hook that event; I didn't notice that it was the right one due to https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3418.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm right, to work correctly with current wlroots we probably need to listen to both.
13b8112
to
528a72f
Compare
I found some additional cases when the input grab would get re-assigned from the screenlock to the desktop, I think c0dd00f covers that now. |
sway/desktop/render.c
Outdated
|
||
struct wlr_session_lock_surface_v1 *lock_surface; | ||
wl_list_for_each(lock_surface, &server.session_lock.lock->surfaces, link) { | ||
if (lock_surface->output != wlr_output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: missing braces
Apart from these last two remaining comments, LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
I've been using this for a few weeks now and it's pretty solid. The usual glitches that used to appear when unplugging/plugging/resuming are gone. 👍 |
This prevents input from bypassing a lockscreen if the lockscreen crashes or has other problems (for example, swaywm/swaylock#204). Swaylock support is already present as of 1.6 (swaywm/swaylock#219).