Fix wrong placement of i3bar when connecting/disconnecting outputs

When connecting or disconnecting an output, i3bar reconfigures its
windows. This also included an unmapping of the bars, and a remapping of
all docked bars. Thus, the bars were misplaced when a monitor was
disconnected.

This commit assures that the remapping of the bars only takes place,
when the mode has actually changed. This patch also takes care of an
inconsistency when pressing the bar_modifier while switching the mode.
Also, the xkbDisplay is now closed correctly, when deregestering the xkb
keyevents.
This commit is contained in:
haptix@web.de
2013-05-29 18:02:46 +02:00
committed by Michael Stapelberg
parent 8353a387c9
commit 4937788e8d
3 changed files with 32 additions and 29 deletions

View File

@ -64,7 +64,7 @@ void got_output_reply(char *reply) {
parse_outputs_json(reply);
DLOG("Reconfiguring Windows...\n");
realloc_sl_buffer();
reconfig_windows();
reconfig_windows(false);
i3_output *o_walk;
SLIST_FOREACH(o_walk, outputs, slist) {
@ -167,7 +167,7 @@ void got_bar_config_update(char *event) {
int old_mode = config.hide_on_modifier;
parse_config_json(event);
if (old_mode != config.hide_on_modifier) {
reconfig_windows();
reconfig_windows(true);
}
draw_bars(false);