mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Implement EWMH _NET_WM_STATE_HIDDEN.
This commit is contained in:
15
client.c
15
client.c
@ -239,6 +239,17 @@ client_freeze(struct client_ctx *cc)
|
||||
cc->flags |= CLIENT_FREEZE;
|
||||
}
|
||||
|
||||
void
|
||||
client_hidden(struct client_ctx *cc)
|
||||
{
|
||||
if (cc->flags & CLIENT_HIDDEN)
|
||||
cc->flags &= ~CLIENT_HIDDEN;
|
||||
else
|
||||
cc->flags |= CLIENT_HIDDEN;
|
||||
|
||||
xu_ewmh_set_net_wm_state(cc);
|
||||
}
|
||||
|
||||
void
|
||||
client_sticky(struct client_ctx *cc)
|
||||
{
|
||||
@ -486,7 +497,7 @@ client_hide(struct client_ctx *cc)
|
||||
XUnmapWindow(X_Dpy, cc->win);
|
||||
|
||||
cc->flags &= ~CLIENT_ACTIVE;
|
||||
cc->flags |= CLIENT_HIDDEN;
|
||||
client_hidden(cc);
|
||||
client_set_wm_state(cc, IconicState);
|
||||
|
||||
if (cc == client_current())
|
||||
@ -501,7 +512,7 @@ client_unhide(struct client_ctx *cc)
|
||||
|
||||
XMapRaised(X_Dpy, cc->win);
|
||||
|
||||
cc->flags &= ~CLIENT_HIDDEN;
|
||||
client_hidden(cc);
|
||||
client_set_wm_state(cc, NormalState);
|
||||
client_draw_border(cc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user