[dev] [dwm] [PATCH] create _MOTIF_WM_HINTS atom

From: Jason Woofenden <jason_AT_jasonwoof.com>
Date: Sat, 18 Apr 2015 13:22:53 -0400

Some clients (such as feh) check for the existance of this atom like so:

        XInternAtom(disp, "_MOTIF_WM_HINTS", True);

to see how/if they can get fullscreen. Also my first hit on a web search for
"x11 howto fullscreen" says to check for this atom:
http://www.tonyobryan.com/index.php?article=9

Note that they do not check if this atom is set on any window, just that it's
been created before. So this patch may make no difference for you if you've run
something like spectrwm in this X11 session.

If I run ``feh -F *.png`` without that atom, the keys don't work (they go to
the terminal that spawned feh) and feh complains about my WM (you can quit by
right-clicking). With this patch (or running anything else that creates the
atom) I can use the feh keybingings as normal.
---
 dwm.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/dwm.c b/dwm.c
index 169adcb..ace62c1 100644
--- a/dwm.c
+++ b/dwm.c
_AT_@ -1526,6 +1526,7 @@ setup(void) {
 	netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
 	netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
 	netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
+	XInternAtom(dpy, "_MOTIF_WM_HINTS", False); /* clients may request borderless/fullscreen */
 	/* init cursors */
 	cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
 	cursor[CurResize] = drw_cur_create(drw, XC_sizing);
-- 
2.1.4
Received on Sat Apr 18 2015 - 19:22:53 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 18 2015 - 19:24:07 CEST