mirror of
https://github.com/swaywm/sway.git
synced 2026-06-15 14:33:54 -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);
|
seat_set_workspace_focus(seat, node);
|
||||||
}
|
}
|
||||||
if (server.session_lock.lock) {
|
if (server.session_lock.lock) {
|
||||||
struct sway_output *output = NULL;
|
// Try focusing the current sway_output's lock-surface
|
||||||
if (node != NULL) {
|
struct sway_output *output = node ? node_get_output(node) : NULL;
|
||||||
switch (node->type) {
|
if (output) {
|
||||||
case N_OUTPUT:
|
|
||||||
output = node->sway_output;
|
|
||||||
break;
|
|
||||||
case N_WORKSPACE:
|
|
||||||
output = node->sway_workspace->output;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (output != NULL) {
|
|
||||||
sway_session_lock_focus_output(server.session_lock.lock, output);
|
sway_session_lock_focus_output(server.session_lock.lock, output);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue