Hi, Here are the patches to set _NET_WM_WINDOW_TYPE_DOCK for dwm's bar and dmenu. Would someone with commit rights apply them to master?
Thank you. Jan Christoph On Wed 20-07-2016 07:05 +0200, Jan Christoph Ebersbach wrote: > Great, thanks for the feeback. I'll provide a patch this week. > > Jan Christoph > > On Tue 19-07-2016 20:47 +0200, v4hn wrote: > > > Where's the patch? > > > > On Tue, Jul 19, 2016 at 07:43:26PM +0200, Jan Christoph Ebersbach > > wrote: > > > Hi, > > > > > > I just stumbled upon the compositor compton and came across this > > > wiki page that describes that shadows don't work properly in > > > combination with dwm and dmenu: > > > https://wiki.archlinux.org/index.php/Compton#dwm_.26_dmenu The > > > reason for this is that _NET_WM_WINDOW_TYPE and > > > _NET_WM_WINDOW_TYPE_DESKTOP aren't set for the bar/menu that is > > > drawn. > > > > > > The closest I could get in my research was > > > http://comments.gmane.org/gmane.comp.misc.suckless/7688. dwm > > > implements _NET_WM_WINDOW_TYPE for client windows. > > > > > > Is there a specific reason for not implementing > > > _NET_WM_WINDOW_TYPE for dwm and dmenu other than that nobody did > > > it so far? I think it's worth the issue because a compositor > > > greatly improves window tearing and it would make the tools more > > > compatible to the expected behavior. > > > > > > Btw, here is another issue related to compositors that might be > > > worth considering again: > > > http://lists.suckless.org/dev/1505/26735.html > > > > > > Jan Christoph > > > -- Jan Christoph Ebersbach I didn’t want some petty, inferior brand of righteousness that comes from keeping a list of rules when I could get the robust kind that comes from trusting Christ - God’s righteousness. Phil 3:9
From b848f86e84f53c751899ecc9eb6aba960219bcce Mon Sep 17 00:00:00 2001 From: Jan Christoph Ebersbach <j...@e-jc.de> Date: Sun, 24 Jul 2016 21:22:52 +0200 Subject: [PATCH] Mark barwin type as dock --- dwm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dwm.c b/dwm.c index b2bc9bd..4fd3e5c 100644 --- a/dwm.c +++ b/dwm.c @@ -62,7 +62,7 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */ enum { NetSupported, NetWMName, NetWMState, - NetWMFullscreen, NetActiveWindow, NetWMWindowType, + NetWMFullscreen, NetActiveWindow, NetWMWindowType, NetWMWindowTypeDock, NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */ enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, @@ -1576,6 +1576,7 @@ setup(void) netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False); netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False); netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False); + netatom[NetWMWindowTypeDock] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DOCK", False); netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False); netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False); /* init cursors */ @@ -1806,6 +1807,8 @@ updatebars(void) m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); + XChangeProperty(dpy, m->barwin, netatom[NetWMWindowType], XA_ATOM, 32, + PropModeReplace, (unsigned char *) &netatom[NetWMWindowTypeDock], 1); XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor); XMapRaised(dpy, m->barwin); } -- 2.9.0
From 8bd603d31c5d05d01baedc9dcf44fe21adc644dc Mon Sep 17 00:00:00 2001 From: Jan Christoph Ebersbach <j...@e-jc.de> Date: Sun, 24 Jul 2016 21:37:23 +0200 Subject: [PATCH] Mark window type as dock --- dmenu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dmenu.c b/dmenu.c index e926eca..d59ed98 100644 --- a/dmenu.c +++ b/dmenu.c @@ -44,7 +44,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, win; static XIC xic; @@ -533,6 +533,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; @@ -586,6 +588,8 @@ setup(void) DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); + XChangeProperty(dpy, win, type, XA_ATOM, 32, PropModeReplace, + (unsigned char *) &dock, 1); /* open input methods */ xim = XOpenIM(dpy, NULL, NULL, NULL); -- 2.9.0
signature.asc
Description: PGP signature