From 8afb7fcd1a84a03ba3755016b8aeb55955120cd4 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Thu, 2 Jul 2020 19:27:44 +0200 Subject: [PATCH] Clear window before redrawing (again!) The timeline of this issue is as follows: In 7a094bc a call to XClearWindow/XFlush was added as part of RGBA support. Afterwards, I noticed that there is some noticeable flicker while redrawing for large notifications, so I foolishly removed both of these calls without considering the full effects. As a result when redrawing notifications 'stack up' with each-other. After a testing it seems that the XFlush call that was causing the flicker is not necessary and XClearWindow works without it. Fixes #728 --- src/x11/x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/x11/x.c b/src/x11/x.c index 8ea9a94..c575f40 100644 --- a/src/x11/x.c +++ b/src/x11/x.c @@ -154,6 +154,8 @@ void x_display_surface(cairo_surface_t *srf, struct window_x11 *win, const struc x_win_move(win, dim->x, dim->y, dim->w, dim->h); cairo_xlib_surface_set_size(win->root_surface, dim->w, dim->h); + XClearWindow(xctx.dpy, win->xwin); + cairo_set_source_surface(win->c_ctx, srf, 0, 0); cairo_paint(win->c_ctx); cairo_show_page(win->c_ctx);