From 3a34cfc603de45aa2636d12f59f650b16a63eebd Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 9 Mar 2009 08:24:05 +0100 Subject: [PATCH] Bugfix: Draw bar at the correct position, handle expose events for bars --- src/handlers.c | 8 ++++++++ src/layout.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/handlers.c b/src/handlers.c index 5a7d5362..016eacf0 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -549,6 +549,14 @@ int handle_expose_event(void *data, xcb_connection_t *conn, xcb_expose_event_t * render_container(conn, stack_win->container); return 1; } + + /* …or one of the bars? */ + i3Screen *screen; + TAILQ_FOREACH(screen, virtual_screens, screens) { + if (screen->bar == event->window) { + render_layout(conn); + } + } return 1; } diff --git a/src/layout.c b/src/layout.c index 14120ef0..17c99a6a 100644 --- a/src/layout.c +++ b/src/layout.c @@ -532,7 +532,7 @@ void render_layout(xcb_connection_t *conn) { } render_bars(conn, r_ws, width, &height); - render_internal_bar(conn, r_ws, width, 18); + render_internal_bar(conn, r_ws, width, font->height + 6); } xcb_flush(conn);