From 72c9a740c77f3e73e2d104add63890ee7df13b43 Mon Sep 17 00:00:00 2001 From: Lance Colton Date: Fri, 13 Jan 2012 13:44:08 -0700 Subject: [PATCH] xdbe replaced with more generic pixmap based buffering but there are 2 bugs: 1) back buffer is totally cleared, background color not working then. 2) loading my usual cario / lua script crashes it with BadDrawable passed to X_GetGeometry --- src/conky.c | 14 +++++++++++++- src/x11.c | 7 +++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/conky.c b/src/conky.c index f55ca4e..7f5ec00 100644 --- a/src/conky.c +++ b/src/conky.c @@ -3494,8 +3494,20 @@ static void clear_text(int exposures) { #ifdef HAVE_XDBE if (use_xdbe) { - /* The swap action is XdbeBackground, which clears */ +/* + The swap action is XdbeBackground, which clears return; +*/ + if (display && window.back_buffer) { // make sure these are !null + /* there is some extra space for borders and outlines */ + XFillRectangle(display, window.back_buffer, window.gc_back, + text_start_x - window.border_inner_margin - window.border_outer_margin - window.border_width, + text_start_y - window.border_inner_margin - window.border_outer_margin - window.border_width, + text_width + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2, + text_height + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2); + } + + } else #endif if (display && window.window) { // make sure these are !null diff --git a/src/x11.c b/src/x11.c index e933a64..cc37c0e 100644 --- a/src/x11.c +++ b/src/x11.c @@ -873,8 +873,11 @@ void xdbe_swap_buffers(void) XCopyArea(display, window.drawable, window.window, window.gc_back, 0, 0, window.width, window.height, 0, 0); /* FIXME should fill w/ window background */ -// XFillRectangle(display, window.back_buffer, window.gc, -// 0, 0, window.width, window.height); + XSet +/* + XFillRectangle(display, window.back_buffer, window.gc, + 0, 0, window.width, window.height); +*/ } } #endif /* HAVE_XDBE */ -- 1.7.9.5