From 80172c88c5515cfd9938dcea7f0fc3e031d8689e Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Sun, 24 Oct 2010 23:03:44 +0200 Subject: [PATCH] Don't map bars on creation, if hide_on_modifier is enabled --- i3bar/src/xcb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index 31d9771c..38ee5bd9 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -667,14 +667,17 @@ void reconfig_windows() { mask, values); - /* We finally map the bar (display it on screen) */ - xcb_void_cookie_t map_cookie = xcb_map_window_checked(xcb_connection, walk->bar); + /* We finally map the bar (display it on screen), unless the modifier-switch is on */ + xcb_void_cookie_t map_cookie; + if (!config.hide_on_modifier) { + map_cookie = xcb_map_window_checked(xcb_connection, walk->bar); + } if (xcb_request_failed(win_cookie, "Could not create window") || xcb_request_failed(pm_cookie, "Could not create pixmap") || xcb_request_failed(prop_cookie, "Could not set dock mode") || xcb_request_failed(gc_cookie, "Could not create graphical context") || - xcb_request_failed(map_cookie, "Could not map window")) { + (!config.hide_on_modifier && xcb_request_failed(map_cookie, "Could not map window"))) { exit(EXIT_FAILURE); } } else { -- 2.39.5