32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
From 3b033dced78fe6e04a739f905e654c0f278a7481 Mon Sep 17 00:00:00 2001
|
|
From: Consolatis <35009135+Consolatis@users.noreply.github.com>
|
|
Date: Wed, 12 Feb 2025 15:14:16 +0100
|
|
Subject: [PATCH] src/layers: handle unmap without any outputs left
|
|
|
|
---
|
|
src/layers.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/src/layers.c b/src/layers.c
|
|
index fc0b2b6ff2..6ce9527dba 100644
|
|
--- a/src/layers.c
|
|
+++ b/src/layers.c
|
|
@@ -136,6 +136,9 @@ try_to_focus_next_layer_or_toplevel(struct server *server)
|
|
{
|
|
struct seat *seat = &server->seat;
|
|
struct output *output = output_nearest_to_cursor(server);
|
|
+ if (!output) {
|
|
+ goto no_output;
|
|
+ }
|
|
|
|
enum zwlr_layer_shell_v1_layer overlay = ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY;
|
|
enum zwlr_layer_shell_v1_layer top = ZWLR_LAYER_SHELL_V1_LAYER_TOP;
|
|
@@ -169,6 +172,7 @@ try_to_focus_next_layer_or_toplevel(struct server *server)
|
|
* Unfocus the current layer-surface and focus the topmost toplevel if
|
|
* one exists on the current workspace.
|
|
*/
|
|
+no_output:
|
|
if (seat->focused_layer) {
|
|
seat_set_focus_layer(seat, NULL);
|
|
}
|