Manage _NET_WM_WINDOW_TYPE_DESKTOP
This commit is contained in:
parent
70bcf3cd50
commit
b44ef3383c
26
src/event.c
26
src/event.c
@ -242,11 +242,37 @@ event_maprequest(XEvent *e)
|
|||||||
XWindowAttributes at;
|
XWindowAttributes at;
|
||||||
struct _systray *s;
|
struct _systray *s;
|
||||||
|
|
||||||
|
Atom *atom, rf;
|
||||||
|
int f;
|
||||||
|
unsigned long n, il, i;
|
||||||
|
unsigned char *data = NULL;
|
||||||
|
|
||||||
/* Which windows to manage */
|
/* Which windows to manage */
|
||||||
if(!XGetWindowAttributes(EVDPY(e), ev->window, &at)
|
if(!XGetWindowAttributes(EVDPY(e), ev->window, &at)
|
||||||
|| at.override_redirect)
|
|| at.override_redirect)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(XGetWindowProperty(EVDPY(e), ev->window, W->net_atom[net_wm_window_type], 0L, 0x7FFFFFFF,
|
||||||
|
False, XA_ATOM, &rf, &f, &n, &il, &data) == Success && n)
|
||||||
|
{
|
||||||
|
atom = (Atom*)data;
|
||||||
|
|
||||||
|
for(i = 0; i < n; ++i)
|
||||||
|
{
|
||||||
|
/* If it is a _NET_WM_WINDOW_TYPE_DESKTOP window */
|
||||||
|
if(atom[i] == W->net_atom[net_wm_window_type_desktop])
|
||||||
|
{
|
||||||
|
/* map it, but don't manage it */
|
||||||
|
XMapWindow(EVDPY(e), ev->window);
|
||||||
|
XMapSubwindows(EVDPY(e), ev->window);
|
||||||
|
XFree(data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XFree(data);
|
||||||
|
}
|
||||||
|
|
||||||
if(!client_gb_win(ev->window))
|
if(!client_gb_win(ev->window))
|
||||||
client_new(ev->window, &at, false);
|
client_new(ev->window, &at, false);
|
||||||
else if((s = systray_find(ev->window)))
|
else if((s = systray_find(ev->window)))
|
||||||
|
|||||||
@ -42,6 +42,7 @@ ewmh_init(void)
|
|||||||
W->net_atom[net_supporting_wm_check] = ATOM("_NET_SUPPORTING_WM_CHECK");
|
W->net_atom[net_supporting_wm_check] = ATOM("_NET_SUPPORTING_WM_CHECK");
|
||||||
W->net_atom[net_wm_window_opacity] = ATOM("_NET_WM_WINDOW_OPACITY");
|
W->net_atom[net_wm_window_opacity] = ATOM("_NET_WM_WINDOW_OPACITY");
|
||||||
W->net_atom[net_wm_window_type_normal] = ATOM("_NET_WM_WINDOW_TYPE_NORMAL");
|
W->net_atom[net_wm_window_type_normal] = ATOM("_NET_WM_WINDOW_TYPE_NORMAL");
|
||||||
|
W->net_atom[net_wm_window_type_desktop] = ATOM("_NET_WM_WINDOW_TYPE_DESKTOP");
|
||||||
W->net_atom[net_wm_window_type_dock] = ATOM("_NET_WM_WINDOW_TYPE_DOCK");
|
W->net_atom[net_wm_window_type_dock] = ATOM("_NET_WM_WINDOW_TYPE_DOCK");
|
||||||
W->net_atom[net_wm_window_type_splash] = ATOM("_NET_WM_WINDOW_TYPE_SPLASH");
|
W->net_atom[net_wm_window_type_splash] = ATOM("_NET_WM_WINDOW_TYPE_SPLASH");
|
||||||
W->net_atom[net_wm_window_type_dialog] = ATOM("_NET_WM_WINDOW_TYPE_DIALOG");
|
W->net_atom[net_wm_window_type_dialog] = ATOM("_NET_WM_WINDOW_TYPE_DIALOG");
|
||||||
|
|||||||
@ -60,6 +60,7 @@ enum
|
|||||||
net_supporting_wm_check,
|
net_supporting_wm_check,
|
||||||
net_wm_window_opacity,
|
net_wm_window_opacity,
|
||||||
net_wm_window_type_normal,
|
net_wm_window_type_normal,
|
||||||
|
net_wm_window_type_desktop,
|
||||||
net_wm_window_type_dock,
|
net_wm_window_type_dock,
|
||||||
net_wm_window_type_splash,
|
net_wm_window_type_splash,
|
||||||
net_wm_window_type_dialog,
|
net_wm_window_type_dialog,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user