about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-06-12 10:10:01 +0200
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-06-12 10:10:01 +0200
commit747a9c38699d245441e0aa4b91f04a5f09330559 (patch)
tree975c763383af78e85c94b3969dcc210b9a3f55c0
parentChanged default font (diff)
downloaddmenu-747a9c38699d245441e0aa4b91f04a5f09330559.tar.gz
dmenu-747a9c38699d245441e0aa4b91f04a5f09330559.tar.bz2
dmenu-747a9c38699d245441e0aa4b91f04a5f09330559.zip
Added more extensive X window info [Patch]
-rw-r--r--dmenu.c6
-rw-r--r--patches/wm_type.diff31
2 files changed, 36 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index e7ce2fd..665ade5 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -45,7 +45,7 @@ static struct item *matches, *matchend;
 static struct item *prev, *curr, *next, *sel;
 static int mon = -1, screen;
 
-static Atom clip, utf8;
+static Atom clip, utf8, type, dock;
 static Display *dpy;
 static Window root, parentwin, win;
 static XIC xic;
@@ -733,6 +733,8 @@ setup(void)
 
 	clip = XInternAtom(dpy, "CLIPBOARD",   False);
 	utf8 = XInternAtom(dpy, "UTF8_STRING", False);
+  type = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
+  dock = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DOCK", False);
 
 	/* calculate menu geometry */
 	bh = drw->fonts->h + 2;
@@ -791,6 +793,8 @@ setup(void)
 	                    CopyFromParent, CopyFromParent, CopyFromParent,
 	                    CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
 	XSetClassHint(dpy, win, &ch);
+  XChangeProperty(dpy, win, type, XA_ATOM, 32, PropModeReplace,
+  (unsigned char *) &dock, 1);
 
 
 	/* input methods */
diff --git a/patches/wm_type.diff b/patches/wm_type.diff
new file mode 100644
index 0000000..e0ec320
--- /dev/null
+++ b/patches/wm_type.diff
@@ -0,0 +1,31 @@
+Index: dmenu-patches/dmenu/dmenu.c
+===================================================================
+--- dmenu-patches.orig/dmenu/dmenu.c
++++ dmenu-patches/dmenu/dmenu.c
+@@ -49,7 +49,7 @@ static struct item *matches, *matchend;
+ static struct item *prev, *curr, *next, *sel;
+ static int mon = -1, screen;
+ 
+-static Atom clip, utf8;
++static Atom clip, utf8, type, dock;
+ static Display *dpy;
+ static Window root, parentwin, win;
+ static XIC xic;
+@@ -690,6 +690,8 @@ setup(void)
+ 
+ 	clip = XInternAtom(dpy, "CLIPBOARD",   False);
+ 	utf8 = XInternAtom(dpy, "UTF8_STRING", False);
++	type = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
++	dock = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DOCK", False);
+ 
+ 	/* calculate menu geometry */
+ 	bh = drw->fonts->h + 2;
+@@ -747,6 +749,8 @@ setup(void)
+ 	                    CopyFromParent, CopyFromParent, CopyFromParent,
+ 	                    CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
+ 	XSetClassHint(dpy, win, &ch);
++	XChangeProperty(dpy, win, type, XA_ATOM, 32, PropModeReplace,
++			(unsigned char *) &dock, 1);
+ 
+ 	/* open input methods */
+ 	xim = XOpenIM(dpy, NULL, NULL, NULL);