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

sway: extensions: make locking give back focus #1014

Merged
merged 2 commits into from
Dec 26, 2016
Merged

sway: extensions: make locking give back focus #1014

merged 2 commits into from
Dec 26, 2016

Conversation

cyphar
Copy link
Contributor

@cyphar cyphar commented Dec 26, 2016

Don't switch the internal tracking of focus to the swaylock surface,
to allow for switching back to the previously active window (or the
currently active window, if some new process changed).

Closes #998
Signed-off-by: Aleksa Sarai [email protected]

When destroying lock surfaces, we really should only unlock a
desktop_shell if the set of lock surfaces has dropped to zero (since
callers need to do a set_lock_surface for every output).

Signed-off-by: Aleksa Sarai <[email protected]>
Don't switch the internal tracking of focus to the swaylock surface,
to allow for switching back to the previously active window (or the
currently active window, if some new process changed).

Signed-off-by: Aleksa Sarai <[email protected]>
swayc_t *focus_output = swayc_active_output();
if (focus_output == output) {
set_focused_container(view);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the lock surface still get all of the keypresses if you remove this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked when I tested it ¯_(ツ)_/¯

Copy link
Contributor Author

@cyphar cyphar Dec 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it worked when I tested it too. I think it's because the keypresses are sent to the frontmost wlc view?

@ddevault ddevault merged commit 725582c into swaywm:master Dec 26, 2016
@ddevault
Copy link
Contributor

Thanks!

@cyphar cyphar deleted the swaylock-fix-focus branch December 26, 2016 22:58
@ddevault ddevault mentioned this pull request Dec 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants