From 713397430600edc9add8619e953dc8ea1d08b2f5 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 11 Apr 2009 19:06:26 +0200 Subject: [PATCH] =?utf8?q?Bugfix:=20Don=E2=80=99t=20only=20check=20for=20t?= =?utf8?q?he=20currently=20active=20screen,=20but=20check=20for=20all=20sc?= =?utf8?q?reens=20(Thanks=20Mirko)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/handlers.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/handlers.c b/src/handlers.c index 42f3b947..7ca05686 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -645,7 +645,14 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_noti break; } - if (workspace_empty && (c_ws != client->workspace)) + i3Screen *screen; + TAILQ_FOREACH(screen, virtual_screens, screens) + if (screen->current_workspace == client->workspace->num) { + workspace_empty = false; + break; + } + + if (workspace_empty) client->workspace->screen = NULL; free(client); @@ -799,11 +806,9 @@ int handle_expose_event(void *data, xcb_connection_t *conn, xcb_expose_event_t * /* …or one of the bars? */ i3Screen *screen; - TAILQ_FOREACH(screen, virtual_screens, screens) { - if (screen->bar == event->window) { + TAILQ_FOREACH(screen, virtual_screens, screens) + if (screen->bar == event->window) render_layout(conn); - } - } return 1; } -- 2.39.5