mirror of
https://github.com/swaywm/sway.git
synced 2025-11-26 06:59:59 -05:00
Fix focus related crashes
* seat_set_focus_warp lacked a container NULL check * view mapping code needs to use seat_get_focus_inactive Also, seat_set_focus_warp triggered the wrong IPC event if focus was a workspace, which resulted in swaybar not showing the workspace as active.
This commit is contained in:
parent
d6095588a1
commit
9339026a31
2 changed files with 9 additions and 4 deletions
|
|
@ -775,8 +775,12 @@ void seat_set_focus_warp(struct sway_seat *seat,
|
|||
}
|
||||
}
|
||||
|
||||
if (container->type == C_VIEW) {
|
||||
ipc_event_window(container, "focus");
|
||||
if (container) {
|
||||
if (container->type == C_VIEW) {
|
||||
ipc_event_window(container, "focus");
|
||||
} else if (container->type == C_WORKSPACE) {
|
||||
ipc_event_workspace(NULL, container, "focus");
|
||||
}
|
||||
}
|
||||
|
||||
seat->has_focus = (container != NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue