1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 04:17:33 +00:00

using EWM hints STICKY/SKIP_PAGER/SKIP_TASKBAR; window type NORMAL

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@513 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-01-26 19:57:12 +00:00
parent 08d7a1bc04
commit 3b04e3ecfe

View File

@ -251,14 +251,11 @@ void init_window(int own_window, int w, int h, int l, int set_trans, int back_co
1); 1);
} }
/* PHK: Set EWMH _NET_WM_WINDOW_TYPE to _NET_WM_WINDOW_TYPE_UTILITY. /* PHK: Use EWMH window type NORMAL for _NET_WM_WINDOW_TYPE.
This addresses the issue where conky can disappear under the desktop For XFCE 4+, keeps the window from going under the desktop. */
while running in its own window with property on_bottom=yes and the
desktop gets raised over it. As a utility window, this wont happen.
*/
a = XInternAtom(display, "_NET_WM_WINDOW_TYPE", True); a = XInternAtom(display, "_NET_WM_WINDOW_TYPE", True);
if (a != None) { if (a != None) {
Atom prop = XInternAtom(display, "_NET_WM_WINDOW_TYPE_UTILITY", True); Atom prop = XInternAtom(display, "_NET_WM_WINDOW_TYPE_NORMAL", True);
XChangeProperty(display, window.window, a, XChangeProperty(display, window.window, a,
XA_ATOM, 32, XA_ATOM, 32,
PropModeReplace, PropModeReplace,
@ -266,6 +263,39 @@ void init_window(int own_window, int w, int h, int l, int set_trans, int back_co
1); 1);
} }
/* PHK: Add EWMH hint STICKY to _NET_WM_STATE */
a = XInternAtom(display, "_NET_WM_STATE", True);
if (a != None) {
Atom prop = XInternAtom(display, "_NET_WM_STATE_STICKY", True);
XChangeProperty(display, window.window, a,
XA_ATOM, 32,
PropModeAppend,
(unsigned char *) &prop,
1);
}
/* PHK: Add EWMH hint SKIP_TASKBAR to _NET_WM_STATE */
a = XInternAtom(display, "_NET_WM_STATE", True);
if (a != None) {
Atom prop = XInternAtom(display, "_NET_WM_STATE_SKIP_TASKBAR", True);
XChangeProperty(display, window.window, a,
XA_ATOM, 32,
PropModeAppend,
(unsigned char *) &prop,
1);
}
/* PHK: Add EWMH hint SKIP_PAGER to _NET_WM_STATE */
a = XInternAtom(display, "_NET_WM_STATE", True);
if (a != None) {
Atom prop = XInternAtom(display, "_NET_WM_STATE_SKIP_PAGER", True);
XChangeProperty(display, window.window, a,
XA_ATOM, 32,
PropModeAppend,
(unsigned char *) &prop,
1);
}
if(l) { if(l) {
/* make sure the layer is on the bottom */ /* make sure the layer is on the bottom */
a = XInternAtom(display, "_WIN_LAYER", True); a = XInternAtom(display, "_WIN_LAYER", True);
@ -276,6 +306,16 @@ void init_window(int own_window, int w, int h, int l, int set_trans, int back_co
PropModeReplace, PropModeReplace,
(unsigned char *) &prop, 1); (unsigned char *) &prop, 1);
} }
/* PHK: also append EWMH hint for BELOW also */
a = XInternAtom(display, "_NET_WM_STATE", True);
if (a != None) {
Atom prop = XInternAtom(display, "_NET_WM_STATE_BELOW", True);
XChangeProperty(display, window.window, a,
XA_ATOM, 32,
PropModeAppend,
(unsigned char *) &prop,
1);
}
} }
} }