mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-24 11:55:43 +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:
parent
13b33a257c
commit
7d71ea09e8
18
src/conky.c
18
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;
|
||||
|
@ -336,7 +336,6 @@ char tmpstring2[TEXT_BUFFER_SIZE];
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XDBE
|
||||
#define XDBE
|
||||
#include <X11/extensions/Xdbe.h>
|
||||
#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
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user