summaryrefslogtreecommitdiff
path: root/x11-misc/dunst-1.0.0/net-wm-window-type_followup.patch
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/dunst-1.0.0/net-wm-window-type_followup.patch')
-rw-r--r--x11-misc/dunst-1.0.0/net-wm-window-type_followup.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/x11-misc/dunst-1.0.0/net-wm-window-type_followup.patch b/x11-misc/dunst-1.0.0/net-wm-window-type_followup.patch
new file mode 100644
index 0000000..b01eb01
--- /dev/null
+++ b/x11-misc/dunst-1.0.0/net-wm-window-type_followup.patch
@@ -0,0 +1,81 @@
+From 0466d41c507352766d86f4e2e9292b68162dc6eb Mon Sep 17 00:00:00 2001
+From: Yuri D'Elia <yuri.delia@eurac.edu>
+Date: Thu, 6 Mar 2014 16:47:06 +0100
+Subject: [PATCH] Set _NET_WM_STATE_ABOVE and fix window type.
+
+- Fix indentation.
+- Fix wrong paramenters in call to XChangeProperty
+- Do not try to raise the window, set _NET_WM_STATE_ABOVE instead
+---
+ x.c | 36 +++++++++++++++++++-----------------
+ 1 file changed, 19 insertions(+), 17 deletions(-)
+
+diff --git a/x.c b/x.c
+index a4e877f..f552f1b 100644
+--- a/x.c
++++ b/x.c
+@@ -581,10 +581,6 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback,
+ 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);
+@@ -854,23 +850,29 @@ void x_setup(void)
+ }
+
+
+-static void x_set_win_type(Window win)
++static void x_set_wm(Window win)
+ {
+
+- long data[2];
++ Atom data[2];
++
++ /* set window type */
++ Atom net_wm_window_type =
++ XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE", false);
++
++ data[0] = XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE_NOTIFICATION", false);
++ data[1] = XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE_UTILITY", false);
++
++ XChangeProperty(xctx.dpy, win, net_wm_window_type, XA_ATOM, 32,
++ PropModeReplace, (unsigned char *) data, 2L);
+
+- Atom net_wm_window_type =
+- XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE", false);
+- Atom net_wm_window_type_notification =
+- XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE_NOTIFICATION", false);
+- Atom net_wm_window_type_utility =
+- XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE_UTILITY", false);
++ /* set state above */
++ Atom net_wm_state =
++ XInternAtom(xctx.dpy, "_NET_WM_STATE", false);
+
+- data[0] = net_wm_window_type_notification;
+- data[1] = net_wm_window_type_utility;
++ data[0] = XInternAtom(xctx.dpy, "_NET_WM_STATE_ABOVE", false);
+
+- XChangeProperty(xctx.dpy, win, net_wm_window_type, XA_ATOM, 32,
+- PropModeReplace, (unsigned char *) &data, 1L);
++ XChangeProperty(xctx.dpy, win, net_wm_state, XA_ATOM, 32,
++ PropModeReplace, (unsigned char *) data, 1L);
+ }
+
+ /*
+@@ -906,7 +908,7 @@ static void x_win_setup(void)
+ DefaultScreen(xctx.dpy)),
+ CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
+
+- x_set_win_type(xctx.win);
++ x_set_wm(xctx.win);
+ settings.transparency =
+ settings.transparency > 100 ? 100 : settings.transparency;
+ setopacity(xctx.win,
+--
+1.9.1
+