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

Give focus to another swaylock surface when output is disconnected #2760

Merged

Conversation

RyanDwyer
Copy link
Member

  • Have multiple outputs
  • Launch swaylock
  • Unplug an output (possibly has to be the last "connected" one)
  • The swaylock surface on the remaining output would not respond to key events

This was happening because when the output destroys, focus was not given to the other swaylock surface.

This patch makes focus be transferred to another layer surface owned by the same Wayland client, but only if input was inhibited by the surface being destroyed, and only if it's in the overlay layer. I figure it's best to be overly specific and relax the requirements later if needed.

This patch removes a check in seat_set_focus_surface which was preventing focus from being passed from a layer surface to any other surface. I don't know of a use case for this check, but it's possible that this change could produce issues.

* Have multiple outputs
* Launch swaylock
* Unplug an output (possibly has to be the last "connected" one)
* The swaylock surface on the remaining output would not respond to key
events

This was happening because when the output destroys, focus was not given
to the other swaylock surface.

This patch makes focus be transferred to another surface owned by the
same Wayland client, but only if input was inhibited by the surface
being destroyed, and only if it's in the overlay layer. I figure it's
best to be overly specific and relax the requirements later if needed.

This patch removes a check in seat_set_focus_surface which was
preventing focus from being passed from a layer surface to any other
surface. I don't know of a use case for this check, but it's possible
that this change could produce issues.
@ddevault ddevault requested a review from emersion October 4, 2018 12:15
@emersion emersion merged commit 0d5c2f7 into swaywm:master Oct 4, 2018
@emersion
Copy link
Member

emersion commented Oct 4, 2018

Thanks!

@RyanDwyer RyanDwyer deleted the swaylock-handle-output-disconnect branch October 4, 2018 12:28
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.

3 participants