Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8fd4c32
)
initial code to compile in xcb support.
author
David Hill
<dhill@conformal.com>
Tue, 3 Jul 2012 19:51:50 +0000
(15:51 -0400)
committer
Reginald Kennedy
<rk@rejii.com>
Fri, 20 Jul 2012 21:58:29 +0000
(
05:58
+0800)
many more diffs coming.
Makefile
patch
|
blob
|
history
spectrwm.c
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
e31cdb8
..
f61d5c5
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-13,7
+13,7
@@
CFLAGS+=-std=c89 -Wall -Wno-uninitialized -g
# Uncomment define below to disallow user settable clock format string
#CFLAGS+=-DSWM_DENY_CLOCK_FORMAT
CPPFLAGS+= -I${X11BASE}/include
# 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 -lXrandr -lXtst
+LDADD+=-lutil -L${X11BASE}/lib -lX11-xcb -lXrandr -lXtst
BUILDVERSION != sh "${.CURDIR}/buildver.sh"
.if !${BUILDVERSION} == ""
CPPFLAGS+= -DSPECTRWM_BUILDSTR=\"$(BUILDVERSION)\"
BUILDVERSION != sh "${.CURDIR}/buildver.sh"
.if !${BUILDVERSION} == ""
CPPFLAGS+= -DSPECTRWM_BUILDSTR=\"$(BUILDVERSION)\"
diff --git
a/spectrwm.c
b/spectrwm.c
index
5b97af2
..
225029b
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-90,7
+90,7
@@
#include <X11/keysym.h>
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <X11/keysym.h>
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
-#include <X11/Xlib.h>
+#include <X11/Xlib-xcb.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xrandr.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xrandr.h>
@@
-221,6
+221,7
@@
int xrandr_support;
int xrandr_eventbase;
unsigned int numlockmask = 0;
Display *display;
int xrandr_eventbase;
unsigned int numlockmask = 0;
Display *display;
+xcb_connection_t *conn;
int cycle_empty = 0;
int cycle_visible = 0;
int cycle_empty = 0;
int cycle_visible = 0;
@@
-2159,6
+2160,7
@@
restart(struct swm_region *r, union arg *args)
bar_extra_stop();
bar_extra = 1;
unmap_all();
bar_extra_stop();
bar_extra = 1;
unmap_all();
+ xcb_disconnect(conn);
XCloseDisplay(display);
execvp(start_argv[0], start_argv);
warn("execvp failed");
XCloseDisplay(display);
execvp(start_argv[0], start_argv);
warn("execvp failed");
@@
-7418,6
+7420,9
@@
main(int argc, char *argv[])
if (!(display = XOpenDisplay(0)))
errx(1, "can not open display");
if (!(display = XOpenDisplay(0)))
errx(1, "can not open display");
+ if (!(conn = XGetXCBConnection(display)))
+ errx(1, "can not get XCB connection");
+
if (active_wm())
errx(1, "other wm running");
if (active_wm())
errx(1, "other wm running");
@@
-7597,6
+7602,7
@@
done:
XFreeGC(display, screens[i].bar_gc);
XFreeFontSet(display, bar_fs);
XFreeGC(display, screens[i].bar_gc);
XFreeFontSet(display, bar_fs);
+ xcb_disconnect(conn);
XCloseDisplay(display);
return (0);
XCloseDisplay(display);
return (0);