aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2023-09-03 11:44:30 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2023-09-06 22:22:21 -0600
commitaea8dd6ae122bdc99e104afe019479d45755f239 (patch)
treee9441c2c4adb8b1608ec72f9a02021f1c85562f6
parentc1d8b77f7fb4f082b7eb43474a788e9b5fe04e29 (diff)
return early if the client doesn't have monitor in setfloating
there is still a bug, but for now this prevents a segfault Bug: https://github.com/djpohly/dwl/issues/472
-rw-r--r--dwl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dwl.c b/dwl.c
index 4ff5c37..edea5b1 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2026,6 +2026,8 @@ void
setfloating(Client *c, int floating)
{
c->isfloating = floating;
+ if (!c->mon)
+ return;
wlr_scene_node_reparent(&c->scene->node, layers[c->isfloating ? LyrFloat : LyrTile]);
arrange(c->mon);
printstatus();