Collapse two ChangeGC-calls (thx sECuRE)

This commit is contained in:
Axel Wagner 2011-03-20 19:49:59 +01:00
parent 52e70c3802
commit ba748d72ff
1 changed files with 4 additions and 6 deletions

View File

@ -958,14 +958,12 @@ void draw_bars() {
/* The urgent-hint should get noticed, so we unhide the bars shortly */ /* The urgent-hint should get noticed, so we unhide the bars shortly */
unhide_bars(); unhide_bars();
} }
uint32_t mask = XCB_GC_FOREGROUND | XCB_GC_BACKGROUND;
uint32_t vals[] = { bg_color, bg_color };
xcb_change_gc(xcb_connection, xcb_change_gc(xcb_connection,
outputs_walk->bargc, outputs_walk->bargc,
XCB_GC_FOREGROUND, mask,
&bg_color); vals);
xcb_change_gc(xcb_connection,
outputs_walk->bargc,
XCB_GC_BACKGROUND,
&bg_color);
xcb_rectangle_t rect = { i + 1, 1, ws_walk->name_width + 8, font_height + 4 }; xcb_rectangle_t rect = { i + 1, 1, ws_walk->name_width + 8, font_height + 4 };
xcb_poly_fill_rectangle(xcb_connection, xcb_poly_fill_rectangle(xcb_connection,
outputs_walk->buffer, outputs_walk->buffer,