mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 16:01:27 +00:00
handle_layer_shell_surface: Do not crash if seat doesn't have focus
This commit is contained in:
parent
1376d36104
commit
47b6fea3fe
|
@ -337,7 +337,10 @@ 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);
|
||||
output = ws->output;
|
||||
|
||||
if (ws != NULL) {
|
||||
output = ws->output;
|
||||
}
|
||||
}
|
||||
if (!output) {
|
||||
if (!sway_assert(root->outputs->length,
|
||||
|
|
Loading…
Reference in a new issue