diff options
author | emersion <contact@emersion.fr> | 2018-09-10 13:56:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 13:56:02 +0200 |
commit | 024b9d85ea4cd51d803317c64e46dac659c9f7ec (patch) | |
tree | b22ac5f47e6779bca07e3626780dee9e9e08943d | |
parent | Merge pull request #2609 from ianyfan/commands (diff) | |
parent | handle_layer_shell_surface: Do not crash if seat doesn't have focus (diff) | |
download | sway-024b9d85ea4cd51d803317c64e46dac659c9f7ec.tar.gz sway-024b9d85ea4cd51d803317c64e46dac659c9f7ec.tar.zst sway-024b9d85ea4cd51d803317c64e46dac659c9f7ec.zip |
Merge pull request #2613 from apreiml/fix_no_last_focus_fail
handle_layer_shell_surface: Do not crash if seat doesn't have focus
-rw-r--r-- | sway/desktop/layer_shell.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index 7d254173..076bacc4 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c | |||
@@ -337,7 +337,10 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) { | |||
337 | struct sway_seat *seat = input_manager_get_default_seat(input_manager); | 337 | struct sway_seat *seat = input_manager_get_default_seat(input_manager); |
338 | if (seat) { | 338 | if (seat) { |
339 | struct sway_workspace *ws = seat_get_focused_workspace(seat); | 339 | struct sway_workspace *ws = seat_get_focused_workspace(seat); |
340 | output = ws->output; | 340 | |
341 | if (ws != NULL) { | ||
342 | output = ws->output; | ||
343 | } | ||
341 | } | 344 | } |
342 | if (!output) { | 345 | if (!output) { |
343 | if (!sway_assert(root->outputs->length, | 346 | if (!sway_assert(root->outputs->length, |