diff options
author | okan | 2014-09-17 16:00:44 +0000 |
---|---|---|
committer | okan | 2014-09-17 16:00:44 +0000 |
commit | 8d10d477be60c717703bb419601c8c76be754f54 (patch) | |
tree | 7220a1ddb8d474e982345b775f4006c8c63f271d /client.c | |
parent | 67e11ccf55b1c98c1db978ca29a41a2fdd71e061 (diff) | |
download | cwm-8d10d477be60c717703bb419601c8c76be754f54.tar.gz |
Implement EWMH _NET_WM_STATE_HIDDEN.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: client.c,v 1.183 2014/09/15 13:00:49 okan Exp $ + * $OpenBSD: client.c,v 1.184 2014/09/17 16:00:44 okan Exp $ */ #include <sys/param.h> @@ -240,6 +240,17 @@ client_freeze(struct client_ctx *cc) } 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) { if (cc->flags & CLIENT_STICKY) @@ -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); } |