diff --git a/bin/dwn b/bin/dwn index 29d8666..0b480d4 100755 Binary files a/bin/dwn and b/bin/dwn differ diff --git a/build/client.o b/build/client.o index 0f61583..84afa29 100644 Binary files a/build/client.o and b/build/client.o differ diff --git a/build/main.o b/build/main.o index 868164b..ff05d86 100644 Binary files a/build/main.o and b/build/main.o differ diff --git a/src/client.c b/src/client.c index e57e12c..6357429 100644 --- a/src/client.c +++ b/src/client.c @@ -833,6 +833,7 @@ void client_set_fullscreen(Client *client, bool fullscreen) XRaiseWindow(dwn->display, client->window); XSync(dwn->display, False); } else { + client->flags |= CLIENT_UNMANAGING; client->flags &= ~CLIENT_FULLSCREEN; atoms_update_wm_state(client->window, ewmh.NET_WM_STATE_FULLSCREEN, false); api_emit_window_fullscreen(client->window, false); @@ -855,6 +856,7 @@ void client_set_fullscreen(Client *client, bool fullscreen) decorations_render(client, true); client_raise(client); XSync(dwn->display, False); + client->flags &= ~CLIENT_UNMANAGING; } } diff --git a/src/main.c b/src/main.c index 45b0c74..a959fe6 100644 --- a/src/main.c +++ b/src/main.c @@ -335,6 +335,11 @@ static void handle_unmap_notify(XUnmapEvent *ev) return; } + if (c->flags & CLIENT_UNMANAGING) { + LOG_DEBUG("handle_unmap_notify: window %lu is being unmanged, skipping unmap", c->window); + return; + } + if (c->workspace != (unsigned int)dwn->current_workspace) { return; }