i3bar: Allow to force unhide with draw_bars
This commit is contained in:
parent
8210c6be79
commit
830829922b
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue