1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-25 12:10:03 +00:00

minor macro changes

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@733 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-11-07 02:19:58 +00:00
parent 13b33a257c
commit 7d71ea09e8
3 changed files with 13 additions and 14 deletions

View File

@ -5579,7 +5579,7 @@ static void draw_stuff()
#endif /* X11 */ #endif /* X11 */
draw_text(); draw_text();
#ifdef X11 #ifdef X11
#ifdef XDBE #ifdef HAVE_XDBE
if (use_xdbe) { if (use_xdbe) {
XdbeSwapInfo swap; XdbeSwapInfo swap;
swap.swap_window = window.window; swap.swap_window = window.window;
@ -5592,7 +5592,7 @@ static void draw_stuff()
#ifdef X11 #ifdef X11
static void clear_text(int exposures) static void clear_text(int exposures)
{ {
#ifdef XDBE #ifdef HAVE_XDBE
if (use_xdbe) { if (use_xdbe) {
return; /* The swap action is XdbeBackground, which clears */ return; /* The swap action is XdbeBackground, which clears */
} else } else
@ -5739,7 +5739,7 @@ static void main_loop()
clear_text(1); clear_text(1);
#ifdef XDBE #ifdef HAVE_XDBE
if (use_xdbe) { if (use_xdbe) {
XRectangle r; XRectangle r;
r.x = text_start_x - border_margin; r.x = text_start_x - border_margin;
@ -5880,7 +5880,7 @@ static void main_loop()
*/ */
if (!XEmptyRegion(region)) { if (!XEmptyRegion(region)) {
#ifdef XDBE #ifdef HAVE_XDBE
if (use_xdbe) { if (use_xdbe) {
XRectangle r; XRectangle r;
r.x = text_start_x - border_margin; r.x = text_start_x - border_margin;
@ -6003,7 +6003,7 @@ void clean_up(void)
info.cpu_usage = NULL; info.cpu_usage = NULL;
} }
#ifdef X11 #ifdef X11
#ifdef XDBE #ifdef HAVE_XDBE
if (use_xdbe) { if (use_xdbe) {
XdbeDeallocateBackBufferName(display, window.back_buffer); 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") { CONF("double_buffer") {
use_xdbe = string_to_bool(value); 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 #ifdef OWN_WINDOW
"o" "o"
#endif #endif
#ifdef XDBE #ifdef HAVE_XDBE
"b" "b"
#endif #endif
#endif /* X11 */ #endif /* X11 */
@ -6741,7 +6741,7 @@ int main(int argc, char **argv)
#ifdef OWN_WINDOW #ifdef OWN_WINDOW
" -o create own window to draw\n" " -o create own window to draw\n"
#endif #endif
#ifdef XDBE #ifdef HAVE_XDBE
" -b double buffer (prevents flickering)\n" " -b double buffer (prevents flickering)\n"
#endif #endif
" -w WIN_ID window id to draw\n" " -w WIN_ID window id to draw\n"
@ -6836,7 +6836,7 @@ int main(int argc, char **argv)
own_window = 1; own_window = 1;
break; break;
#endif #endif
#ifdef XDBE #ifdef HAVE_XDBE
case 'b': case 'b':
use_xdbe = 1; use_xdbe = 1;
break; break;

View File

@ -336,7 +336,6 @@ char tmpstring2[TEXT_BUFFER_SIZE];
#endif #endif
#ifdef HAVE_XDBE #ifdef HAVE_XDBE
#define XDBE
#include <X11/extensions/Xdbe.h> #include <X11/extensions/Xdbe.h>
#endif #endif
@ -364,7 +363,7 @@ struct conky_window {
Window root,window,desktop; Window root,window,desktop;
Drawable drawable; Drawable drawable;
GC gc; GC gc;
#ifdef XDBE #ifdef HAVE_XDBE
XdbeBackBuffer back_buffer; XdbeBackBuffer back_buffer;
#endif #endif
#ifdef XFT #ifdef XFT
@ -382,7 +381,7 @@ struct conky_window {
#endif #endif
}; };
#ifdef XDBE #ifdef HAVE_XDBE
extern int use_xdbe; extern int use_xdbe;
#endif #endif

View File

@ -20,7 +20,7 @@
#include <stdio.h> #include <stdio.h>
#ifdef XDBE #ifdef HAVE_XDBE
int use_xdbe; int use_xdbe;
#endif #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. */ /* Drawable is same as window. This may be changed by double buffering. */
window.drawable = window.window; window.drawable = window.window;
#ifdef XDBE #ifdef HAVE_XDBE
if (use_xdbe) { if (use_xdbe) {
int major, minor; int major, minor;
if (!XdbeQueryExtension(display, &major, &minor)) { if (!XdbeQueryExtension(display, &major, &minor)) {