Fix a silly error when redrawing the background. Fixes #108 and #82

This commit is contained in:
LemonBoy 2015-03-03 11:29:35 +01:00
parent 75dbf3397e
commit fe4ff881dd
1 changed files with 5 additions and 5 deletions

10
bar.c
View File

@ -147,10 +147,10 @@ xcb_void_cookie_t xcb_poly_text_16_simple(xcb_connection_t * c,
uint32_t len, const uint16_t *str) uint32_t len, const uint16_t *str)
{ {
static const xcb_protocol_request_t xcb_req = { static const xcb_protocol_request_t xcb_req = {
5, // count 5, // count
0, // ext 0, // ext
XCB_POLY_TEXT_16, // opcode XCB_POLY_TEXT_16, // opcode
1 // isvoid 1 // isvoid
}; };
struct iovec xcb_parts[7]; struct iovec xcb_parts[7];
uint8_t xcb_lendelta[2]; uint8_t xcb_lendelta[2];
@ -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);