about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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 @@
 enum { BarTop, BarBot, BarOff };			/* bar position */
 enum { CurNormal, CurResize, CurMove, CurLast };	/* cursor */
 enum { ColBorder, ColFG, ColBG, ColLast };		/* color */
-enum { NetSupported, NetWMName, NetLast };		/* EWMH atoms */
+enum { NetSupported, NetWMCheck, NetWMName, NetLast };	/* EWMH atoms */
 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
 
 /* typedefs */
@@ -1427,19 +1427,20 @@ void
 setup(void) {
 	int d;
 	unsigned int i, j, mask;
+	Atom utf8string;
 	Window w;
 	XModifierKeymap *modmap;
 	XSetWindowAttributes wa;
 
 	/* init atoms */
+	utf8string = XInternAtom(dpy, "UTF8_STRING", False);
 	wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
 	wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
 	wmatom[WMName] = XInternAtom(dpy, "WM_NAME", False);
 	wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False);
 	netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
+	netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
 	netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
-	XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
-			PropModeReplace, (unsigned char *) netatom, NetLast);
 
 	/* init cursors */
 	cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr);
@@ -1514,6 +1515,17 @@ setup(void) {
 
 	/* multihead support */
 	selscreen = XQueryPointer(dpy, root, &w, &w, &d, &d, &d, &d, &mask);
+
+	/* EWMH properties */
+	XChangeProperty(dpy, barwin, netatom[NetWMCheck], XA_WINDOW, 32,
+			PropModeReplace, (unsigned char *) &barwin, 1);
+	/* HACK: dwm identifies itself as compiz to workaround the XToolkit bug of Sun JDK */
+	XChangeProperty(dpy, barwin, netatom[NetWMName], utf8string, 8,
+			PropModeReplace, (unsigned char *) "compiz", 7);
+	XChangeProperty(dpy, root, netatom[NetWMCheck], XA_WINDOW, 32,
+			PropModeReplace, (unsigned char *) &barwin, 1);
+	XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
+			PropModeReplace, (unsigned char *) netatom, NetLast);
 }
 
 void
g <unknown> 2007-09-17 16:42:37 +0200 committer arg@suckless.org <unknown> 2007-09-17 16:42:37 +0200 made all stuff non-static - so you can choose wether to use dwm the static or the extern way when extending it' href='/acidbong/suckless/dwm/commit/config.h?h=5.6.1&id=fe2775a15ba2d4900788c57194da2bad3d19cfaf'>fe2775a ^
0235a84 ^
fa857b2 ^
0235a84 ^


f196b71 ^
3794c62 ^
f196b71 ^
fa857b2 ^
8d1810c ^


fe2775a ^
0235a84 ^


3794c62 ^

f196b71 ^

b515765 ^
04dec4c ^
19dcbc5 ^
73e2aba ^


5767699 ^
2c477cf ^
2aef8b9 ^
10bc0ce ^

a923298 ^

2c477cf ^

338c083 ^
2c477cf ^

10bc0ce ^

















2c477cf ^
10bc0ce ^

















2c477cf ^
b515765 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93