wibox: make sure no garbage is painted to the screen
Wiboxes are lazily updated. This means that we could receive an expose event on them between making them visible and actually painting their content. Due to this we were copying undefined content to the wibox, because the pixmap was only created just now, but it wasn't actually filled with anything yet. Signed-off-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
00092b59bb
commit
056d9a074b
5
event.c
5
event.c
|
@ -528,7 +528,10 @@ event_handle_expose(void *data __attribute__ ((unused)),
|
||||||
{
|
{
|
||||||
wibox_t *wibox;
|
wibox_t *wibox;
|
||||||
|
|
||||||
if((wibox = wibox_getbywin(ev->window)))
|
/* If the wibox got need_update set, skip this because it will be repainted
|
||||||
|
* soon anyway. Without this we could be painting garbage to the screen!
|
||||||
|
*/
|
||||||
|
if((wibox = wibox_getbywin(ev->window)) && !wibox->need_update)
|
||||||
wibox_refresh_pixmap_partial(wibox,
|
wibox_refresh_pixmap_partial(wibox,
|
||||||
ev->x, ev->y,
|
ev->x, ev->y,
|
||||||
ev->width, ev->height);
|
ev->width, ev->height);
|
||||||
|
|
Loading…
Reference in New Issue