mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
treat WM_CHANGE_STATE like other atoms
This commit is contained in:
parent
01bfdd7b42
commit
556a50d8f7
1
calmwm.h
1
calmwm.h
@ -527,6 +527,7 @@ enum {
|
|||||||
WM_PROTOCOLS,
|
WM_PROTOCOLS,
|
||||||
_MOTIF_WM_HINTS,
|
_MOTIF_WM_HINTS,
|
||||||
UTF8_STRING,
|
UTF8_STRING,
|
||||||
|
WM_CHANGE_STATE,
|
||||||
CWMH_NITEMS
|
CWMH_NITEMS
|
||||||
};
|
};
|
||||||
enum {
|
enum {
|
||||||
|
@ -340,16 +340,13 @@ static void
|
|||||||
xev_handle_clientmessage(XEvent *ee)
|
xev_handle_clientmessage(XEvent *ee)
|
||||||
{
|
{
|
||||||
XClientMessageEvent *e = &ee->xclient;
|
XClientMessageEvent *e = &ee->xclient;
|
||||||
Atom xa_wm_change_state;
|
|
||||||
struct client_ctx *cc;
|
struct client_ctx *cc;
|
||||||
|
|
||||||
xa_wm_change_state = XInternAtom(X_Dpy, "WM_CHANGE_STATE", False);
|
|
||||||
|
|
||||||
if ((cc = client_find(e->window)) == NULL)
|
if ((cc = client_find(e->window)) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (e->message_type == xa_wm_change_state && e->format == 32 &&
|
if (e->message_type == cwmh[WM_CHANGE_STATE].atom &&
|
||||||
e->data.l[0] == IconicState)
|
e->format == 32 && e->data.l[0] == IconicState)
|
||||||
client_hide(cc);
|
client_hide(cc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
xutil.c
1
xutil.c
@ -239,6 +239,7 @@ struct atom_ctx cwmh[CWMH_NITEMS] = {
|
|||||||
{"WM_PROTOCOLS", None},
|
{"WM_PROTOCOLS", None},
|
||||||
{"_MOTIF_WM_HINTS", None},
|
{"_MOTIF_WM_HINTS", None},
|
||||||
{"UTF8_STRING", None},
|
{"UTF8_STRING", None},
|
||||||
|
{"WM_CHANGE_STATE", None},
|
||||||
};
|
};
|
||||||
struct atom_ctx ewmh[EWMH_NITEMS] = {
|
struct atom_ctx ewmh[EWMH_NITEMS] = {
|
||||||
{"_NET_SUPPORTED", None},
|
{"_NET_SUPPORTED", None},
|
||||||
|
Loading…
Reference in New Issue
Block a user