]> git.sur5r.net Git - i3/i3/commitdiff
i3bar: Allow to force unhide with draw_bars
authorQuentin Glidic <sardemff7+git@sardemff7.net>
Tue, 21 Aug 2012 11:51:40 +0000 (13:51 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 22 Sep 2012 13:15:57 +0000 (15:15 +0200)
i3bar/include/xcb.h
i3bar/src/child.c
i3bar/src/ipc.c
i3bar/src/xcb.c

index 6c7bc567e4b07d7385667f7476cfa91980f2f922..dcc4d78116e9a6b1f9a4ca954acb251e2d65e153 100644 (file)
@@ -110,7 +110,7 @@ void reconfig_windows(void);
  * Render the bars, with buttons and statusline
  *
  */
-void draw_bars(void);
+void draw_bars(bool force_unhide);
 
 /*
  * Redraw the bars, i.e. simply copy the buffer to the barwindow
index e4c0f35737a123de9d75f679e036eb6ab5137ed0..d6e7417657be058d8164216ef66a0c04ca5cf700 100644 (file)
@@ -172,7 +172,7 @@ static unsigned char *get_buffer(ev_io *watcher, int *ret_buffer_len) {
             /* end of file, kill the watcher */
             ELOG("stdin: received EOF\n");
             cleanup();
-            draw_bars();
+            draw_bars(false);
             *ret_buffer_len = -1;
             return NULL;
         }
@@ -231,7 +231,7 @@ void stdin_io_cb(struct ev_loop *loop, ev_io *watcher, int revents) {
         read_flat_input((char*)buffer, rec);
     }
     free(buffer);
-    draw_bars();
+    draw_bars(false);
 }
 
 /*
index 2cc80cf7fac320cdf60af546e94331c6abe56d92..fc8c6492d9b9759211142aa7450740ddf1225e5d 100644 (file)
@@ -42,7 +42,7 @@ void got_command_reply(char *reply) {
 void got_workspace_reply(char *reply) {
     DLOG("Got Workspace-Data!\n");
     parse_workspaces_json(reply);
-    draw_bars();
+    draw_bars(false);
 }
 
 /*
@@ -71,7 +71,7 @@ void got_output_reply(char *reply) {
         kick_tray_clients(o_walk);
     }
 
-    draw_bars();
+    draw_bars(false);
 }
 
 /*
index aedf6392c7bd84c679c47c88f0d9e28a6c99f18f..405eefdb0f6f58de196430a3ed28379a1c4decb7 100644 (file)
@@ -531,7 +531,7 @@ static void handle_client_message(xcb_client_message_event_t* event) {
             /* Trigger an update to copy the statusline text to the appropriate
              * position */
             configure_trayclients();
-            draw_bars();
+            draw_bars(false);
         }
     }
 }
@@ -559,7 +559,7 @@ static void handle_unmap_notify(xcb_unmap_notify_event_t* event) {
 
             /* Trigger an update, we now have more space for the statusline */
             configure_trayclients();
-            draw_bars();
+            draw_bars(false);
             return;
         }
     }
@@ -624,13 +624,13 @@ static void handle_property_notify(xcb_property_notify_event_t *event) {
             xcb_unmap_window(xcb_connection, trayclient->win);
             trayclient->mapped = map_it;
             configure_trayclients();
-            draw_bars();
+            draw_bars(false);
         } else if (!trayclient->mapped && map_it) {
             /* need to map the window */
             xcb_map_window(xcb_connection, trayclient->win);
             trayclient->mapped = map_it;
             configure_trayclients();
-            draw_bars();
+            draw_bars(false);
         }
         free(xembedr);
     }
@@ -1398,14 +1398,13 @@ void reconfig_windows(void) {
  * Render the bars, with buttons and statusline
  *
  */
-void draw_bars(void) {
+void draw_bars(bool unhide) {
     DLOG("Drawing Bars...\n");
     int i = 0;
 
     refresh_statusline();
 
     static char *last_urgent_ws = NULL;
-    bool unhide = false;
     bool walks_away = true;
 
     i3_output *outputs_walk;