From 7d71ea09e823e6e9aede8e8bf98261384548b9ac Mon Sep 17 00:00:00 2001 From: Philip Kovacs Date: Tue, 7 Nov 2006 02:19:58 +0000 Subject: [PATCH] minor macro changes git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@733 7f574dfc-610e-0410-a909-a81674777703 --- src/conky.c | 18 +++++++++--------- src/conky.h | 5 ++--- src/x11.c | 4 ++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/conky.c b/src/conky.c index 3df9d0bf..2d6db989 100644 --- a/src/conky.c +++ b/src/conky.c @@ -5579,7 +5579,7 @@ static void draw_stuff() #endif /* X11 */ draw_text(); #ifdef X11 -#ifdef XDBE +#ifdef HAVE_XDBE if (use_xdbe) { XdbeSwapInfo swap; swap.swap_window = window.window; @@ -5592,7 +5592,7 @@ static void draw_stuff() #ifdef X11 static void clear_text(int exposures) { -#ifdef XDBE +#ifdef HAVE_XDBE if (use_xdbe) { return; /* The swap action is XdbeBackground, which clears */ } else @@ -5739,7 +5739,7 @@ static void main_loop() clear_text(1); -#ifdef XDBE +#ifdef HAVE_XDBE if (use_xdbe) { XRectangle r; r.x = text_start_x - border_margin; @@ -5880,7 +5880,7 @@ static void main_loop() */ if (!XEmptyRegion(region)) { -#ifdef XDBE +#ifdef HAVE_XDBE if (use_xdbe) { XRectangle r; r.x = text_start_x - border_margin; @@ -6003,7 +6003,7 @@ void clean_up(void) info.cpu_usage = NULL; } #ifdef X11 -#ifdef XDBE +#ifdef HAVE_XDBE if (use_xdbe) { XdbeDeallocateBackBufferName(display, window.back_buffer); } @@ -6366,7 +6366,7 @@ else if (strcasecmp(name, a) == 0 || strcasecmp(name, b) == 0) -#ifdef XDBE +#ifdef HAVE_XDBE CONF("double_buffer") { use_xdbe = string_to_bool(value); } @@ -6661,7 +6661,7 @@ static const char *getopt_string = "vVdt:f:u:i:hc:w:x:y:a:" #ifdef OWN_WINDOW "o" #endif -#ifdef XDBE +#ifdef HAVE_XDBE "b" #endif #endif /* X11 */ @@ -6741,7 +6741,7 @@ int main(int argc, char **argv) #ifdef OWN_WINDOW " -o create own window to draw\n" #endif -#ifdef XDBE +#ifdef HAVE_XDBE " -b double buffer (prevents flickering)\n" #endif " -w WIN_ID window id to draw\n" @@ -6836,7 +6836,7 @@ int main(int argc, char **argv) own_window = 1; break; #endif -#ifdef XDBE +#ifdef HAVE_XDBE case 'b': use_xdbe = 1; break; diff --git a/src/conky.h b/src/conky.h index c86b8907..cc118529 100644 --- a/src/conky.h +++ b/src/conky.h @@ -336,7 +336,6 @@ char tmpstring2[TEXT_BUFFER_SIZE]; #endif #ifdef HAVE_XDBE -#define XDBE #include #endif @@ -364,7 +363,7 @@ struct conky_window { Window root,window,desktop; Drawable drawable; GC gc; -#ifdef XDBE +#ifdef HAVE_XDBE XdbeBackBuffer back_buffer; #endif #ifdef XFT @@ -382,7 +381,7 @@ struct conky_window { #endif }; -#ifdef XDBE +#ifdef HAVE_XDBE extern int use_xdbe; #endif diff --git a/src/x11.c b/src/x11.c index 63ad0115..374f8bf7 100644 --- a/src/x11.c +++ b/src/x11.c @@ -20,7 +20,7 @@ #include -#ifdef XDBE +#ifdef HAVE_XDBE int use_xdbe; #endif @@ -446,7 +446,7 @@ void init_window(int own_window, int w, int h, int set_trans, int back_colour, c /* Drawable is same as window. This may be changed by double buffering. */ window.drawable = window.window; -#ifdef XDBE +#ifdef HAVE_XDBE if (use_xdbe) { int major, minor; if (!XdbeQueryExtension(display, &major, &minor)) {