mirror of
https://github.com/swaywm/sway.git
synced 2024-11-17 13:42:36 +00:00
Merge pull request #2613 from apreiml/fix_no_last_focus_fail
handle_layer_shell_surface: Do not crash if seat doesn't have focus
This commit is contained in:
commit
024b9d85ea
|
@ -337,8 +337,11 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
|
|||
struct sway_seat *seat = input_manager_get_default_seat(input_manager);
|
||||
if (seat) {
|
||||
struct sway_workspace *ws = seat_get_focused_workspace(seat);
|
||||
|
||||
if (ws != NULL) {
|
||||
output = ws->output;
|
||||
}
|
||||
}
|
||||
if (!output) {
|
||||
if (!sway_assert(root->outputs->length,
|
||||
"cannot auto-assign output for layer")) {
|
||||
|
|
Loading…
Reference in a new issue