Merge branch 'master' of github.com:LemonBoy/bar
* 'master' of github.com:LemonBoy/bar: Fix a silly error when redrawing the background. Fixes #108 and #82 fix non left alignments causing wrong clicks
This commit is contained in:
commit
eb5d99467d
9
bar.c
9
bar.c
|
@ -206,7 +206,7 @@ draw_char (monitor_t *mon, font_t *cur_font, int x, int align, uint16_t ch)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the background first
|
// Draw the background first
|
||||||
fill_rect(mon->pixmap, gc[GC_CLEAR], x, by, ch_width, bh);
|
fill_rect(mon->pixmap, gc[GC_CLEAR], x, 0, ch_width, bh);
|
||||||
|
|
||||||
// xcb accepts string in UCS-2 BE, so swap
|
// xcb accepts string in UCS-2 BE, so swap
|
||||||
ch = (ch >> 8) | (ch << 8);
|
ch = (ch >> 8) | (ch << 8);
|
||||||
|
@ -340,9 +340,10 @@ area_shift (xcb_window_t win, const int align, int delta)
|
||||||
delta /= 2;
|
delta /= 2;
|
||||||
|
|
||||||
for (int i = 0; i < astack.pos; i++) {
|
for (int i = 0; i < astack.pos; i++) {
|
||||||
if (astack.slot[i].window == win && astack.slot[i].align == align) {
|
area_t *a = &astack.slot[i];
|
||||||
astack.slot[i].begin -= delta;
|
if (a->window == win && a->align == align && !a->active) {
|
||||||
astack.slot[i].end -= delta;
|
a->begin -= delta;
|
||||||
|
a->end -= delta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user