From: Axel Wagner Date: Sun, 24 Oct 2010 21:03:44 +0000 (+0200) Subject: Don't map bars on creation, if hide_on_modifier is enabled X-Git-Tag: 4.0.1~7^2~50 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=80172c88c5515cfd9938dcea7f0fc3e031d8689e;p=i3%2Fi3 Don't map bars on creation, if hide_on_modifier is enabled --- 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 {