Package: dunst
Version: 1.0.0-2
Followup-For: Bug #729690
Indeed, I also experienced this problem using i3lock.
dunst is forcedly raising its window, which is broken behavior anyway.
The _NET_WM_STATE_ABOVE property should be set on the window instead to avoid
conflicting behaviors with other "above" windows.
The attached patch fixes this bug.
--- dunst-1.0.0.Orig/x.c 2014-03-05 12:41:03.274349758 +0100
+++ dunst-1.0.0/x.c 2014-03-05 18:49:30.659319475 +0100
@@ -498,10 +513,6 @@
case SelectionNotify:
if (ev.xselection.property == xctx.utf8)
break;
- case VisibilityNotify:
- if (ev.xvisibility.state != VisibilityUnobscured)
- XRaiseWindow(xctx.dpy, xctx.win);
- break;
case ButtonPress:
if (ev.xbutton.window == xctx.win) {
x_handle_click(ev);
@@ -798,6 +809,12 @@
CopyFromParent, DefaultVisual(xctx.dpy,
DefaultScreen(xctx.dpy)),
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
+
+ Atom _NET_WM_STATE = XInternAtom(xctx.dpy, "_NET_WM_STATE", false);
+ Atom _NET_WM_STATE_ABOVE = XInternAtom(xctx.dpy, "_NET_WM_STATE_ABOVE", false);
+ XChangeProperty(xctx.dpy, xctx.win, _NET_WM_STATE, XA_ATOM, 32,
+ PropModeReplace, (unsigned char *)&_NET_WM_STATE_ABOVE, 1L);
+
settings.transparency =
settings.transparency > 100 ? 100 : settings.transparency;
setopacity(xctx.win,