]> code.delx.au - spectrwm/commitdiff
bring back the Display variable. Will be needed for the font code.
authorDavid Hill <dhill@conformal.com>
Tue, 17 Jul 2012 18:52:32 +0000 (14:52 -0400)
committerReginald Kennedy <rk@rejii.com>
Fri, 20 Jul 2012 22:00:02 +0000 (06:00 +0800)
Makefile
spectrwm.c

index d4542529db320d5b53b3411f306af2be4bf80416..1d5b1333ecf75e2293dda0ee6fc8cf4451e13fa6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ CFLAGS+=-std=gnu89 -Wall -Wno-uninitialized -g
 # Uncomment define below to disallow user settable clock format string
 #CFLAGS+=-DSWM_DENY_CLOCK_FORMAT
 CPPFLAGS+= -I${X11BASE}/include
-LDADD+=-lutil -L${X11BASE}/lib -lX11 -lxcb -lxcb-aux -lxcb-icccm -lxcb-keysyms -lxcb-randr -lxcb-xtest
+LDADD+=-lutil -L${X11BASE}/lib -lX11 -lX11-xcb -lxcb-aux -lxcb-icccm -lxcb-keysyms -lxcb-randr -lxcb-xtest
 BUILDVERSION != sh "${.CURDIR}/buildver.sh"
 .if !${BUILDVERSION} == ""
 CPPFLAGS+= -DSPECTRWM_BUILDSTR=\"$(BUILDVERSION)\"
index 4699392923002d439183cd24cf811cab5956e9b7..dee3300cd07756d8f87210bfafec0b179a0a94b5 100644 (file)
@@ -89,7 +89,7 @@
 #include <util.h>
 #include <X11/cursorfont.h>
 #include <X11/extensions/Xrandr.h>
-#include <xcb/xcb.h>
+#include <X11/Xlib-xcb.h>
 #include <xcb/xcb_atom.h>
 #include <xcb/xcb_aux.h>
 #include <xcb/xcb_event.h>
@@ -260,6 +260,8 @@ int                 ss_enabled = 0;
 int                    xrandr_support;
 int                    xrandr_eventbase;
 unsigned int           numlockmask = 0;
+
+Display                        *display;
 xcb_connection_t       *conn;
 xcb_key_symbols_t      *syms;
 
@@ -7712,7 +7714,10 @@ main(int argc, char *argv[])
        sact.sa_flags = SA_NOCLDSTOP;
        sigaction(SIGCHLD, &sact, NULL);
 
-       conn = xcb_connect(NULL, NULL);
+       if (!(display = XOpenDisplay(0)))
+               errx(1, "can not open display");
+
+       conn = XGetXCBConnection(display); 
        if (xcb_connection_has_error(conn))
                errx(1, "can not get XCB connection");