From 8cc1ca9573e31822368dada7bea512fe106e285f Mon Sep 17 00:00:00 2001 From: Felix Palmen Date: Tue, 30 Jul 2024 11:38:33 +0200 Subject: [PATCH] Window: Fix hide() behavior When hiding to minimized state, don't assume the window will be unmapped, instead wait for the window manager to change state, which may also never occur. --- src/bin/xmoji/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/xmoji/window.c b/src/bin/xmoji/window.c index 35515e4..cb7f5ba 100644 --- a/src/bin/xmoji/window.c +++ b/src/bin/xmoji/window.c @@ -206,7 +206,7 @@ static int hide(void *obj) if (!self->mapped) return 0; if (self->havewmstate && self->hideState == WS_MINIMIZED) { - self->mapped = 0; + if (self->state == WS_MINIMIZED) return 0; xcb_client_message_event_t msg = { .response_type = XCB_CLIENT_MESSAGE, .format = 32,