summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-11-15 18:57:31 +0100
committerAnselm R. Garbe <garbeam@gmail.com>2007-11-15 18:57:31 +0100
commit762b66ae7c0cffb51bfbda8c52c4ecc892ae1808 (patch)
tree25a974ebf0a0e6026fc66dd1020c333660cf6f4a
parentapplied Ritesh's patch to stext handling with some minor modifications (diff)
downloaddwm-762b66ae7c0cffb51bfbda8c52c4ecc892ae1808.tar.gz
dwm-762b66ae7c0cffb51bfbda8c52c4ecc892ae1808.zip
hack that adds NET_SUPPORTING_WM_CHECK handling, dwm identifies itself as compiz, hence I believe this might workaround the JDK 1.6+ XToolkit bug
Diffstat (limited to '')
-rw-r--r--dwm.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/dwm.c b/dwm.c
index 1529372..88743c5 100644
--- a/dwm.c
+++ b/dwm.c
@@ -53,7 +53,7 @@
53enum { BarTop, BarBot, BarOff }; /* bar position */ 53enum { BarTop, BarBot, BarOff }; /* bar position */
54enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ 54enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
55enum { ColBorder, ColFG, ColBG, ColLast }; /* color */ 55enum { ColBorder, ColFG, ColBG, ColLast }; /* color */
56enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ 56enum { NetSupported, NetWMCheck, NetWMName, NetLast }; /* EWMH atoms */
57enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */ 57enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
58 58
59/* typedefs */ 59/* typedefs */
@@ -1427,19 +1427,20 @@ void
1427setup(void) { 1427setup(void) {
1428 int d; 1428 int d;
1429 unsigned int i, j, mask; 1429 unsigned int i, j, mask;
1430 Atom utf8string;
1430 Window w; 1431 Window w;
1431 XModifierKeymap *modmap; 1432 XModifierKeymap *modmap;
1432 XSetWindowAttributes wa; 1433 XSetWindowAttributes wa;
1433 1434
1434 /* init atoms */ 1435 /* init atoms */
1436 utf8string = XInternAtom(dpy, "UTF8_STRING", False);
1435 wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); 1437 wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
1436 wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); 1438 wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
1437 wmatom[WMName] = XInternAtom(dpy, "WM_NAME", False); 1439 wmatom[WMName] = XInternAtom(dpy, "WM_NAME", False);
1438 wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False); 1440 wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False);
1439 netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); 1441 netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
1442 netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
1440 netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); 1443 netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
1441 XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
1442 PropModeReplace, (unsigned char *) netatom, NetLast);
1443 1444
1444 /* init cursors */ 1445 /* init cursors */
1445 cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr); 1446 cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr);
@@ -1514,6 +1515,17 @@ setup(void) {
1514 1515
1515 /* multihead support */ 1516 /* multihead support */
1516 selscreen = XQueryPointer(dpy, root, &w, &w, &d, &d, &d, &d, &mask); 1517 selscreen = XQueryPointer(dpy, root, &w, &w, &d, &d, &d, &d, &mask);
1518
1519 /* EWMH properties */
1520 XChangeProperty(dpy, barwin, netatom[NetWMCheck], XA_WINDOW, 32,
1521 PropModeReplace, (unsigned char *) &barwin, 1);
1522 /* HACK: dwm identifies itself as compiz to workaround the XToolkit bug of Sun JDK */
1523 XChangeProperty(dpy, barwin, netatom[NetWMName], utf8string, 8,
1524 PropModeReplace, (unsigned char *) "compiz", 7);
1525 XChangeProperty(dpy, root, netatom[NetWMCheck], XA_WINDOW, 32,
1526 PropModeReplace, (unsigned char *) &barwin, 1);
1527 XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
1528 PropModeReplace, (unsigned char *) netatom, NetLast);
1517} 1529}
1518 1530
1519void 1531void