diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-08-02 08:07:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-02 08:07:40 -0400 |
commit | eec25ce60e17590c9c5c2004b9d133692131d65d (patch) | |
tree | 58431502a51ee0fa759fffb763772be7f9d9a308 /sway/input | |
parent | e2eaf7b9b521e67d38d24b5f8a38fee84c9295a2 (diff) | |
parent | 9339026a31103b453545cf65cd45f345e44d0437 (diff) |
Merge pull request #2406 from RyanDwyer/fix-focus-crashes
Fix focus related crashes
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 869560af..dd4d5c3b 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -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); |