mirror of
https://github.com/swaywm/sway.git
synced 2026-06-13 14:33:19 -04:00
Simplified seat logic for focusing a new lock surface
This commit is contained in:
parent
d757caf54f
commit
47a0b18d2a
1 changed files with 3 additions and 14 deletions
|
|
@ -1266,20 +1266,9 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) {
|
|||
seat_set_workspace_focus(seat, node);
|
||||
}
|
||||
if (server.session_lock.lock) {
|
||||
struct sway_output *output = NULL;
|
||||
if (node != NULL) {
|
||||
switch (node->type) {
|
||||
case N_OUTPUT:
|
||||
output = node->sway_output;
|
||||
break;
|
||||
case N_WORKSPACE:
|
||||
output = node->sway_workspace->output;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (output != NULL) {
|
||||
// Try focusing the current sway_output's lock-surface
|
||||
struct sway_output *output = node ? node_get_output(node) : NULL;
|
||||
if (output) {
|
||||
sway_session_lock_focus_output(server.session_lock.lock, output);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue