Description: Allow hiding windows using the wmctrl utility Handle changes of the NET_WM_STATE_HIDDEN atom in the clientUpdateNetState function Author: pnd23@telenet.be Origin: other Forwarded: no Last-Update: 2019-05-03 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ Index: xfwm4-4.12.5/src/netwm.c =================================================================== --- xfwm4-4.12.5.orig/src/netwm.c 2018-07-27 22:34:41.000000000 +0200 +++ xfwm4-4.12.5/src/netwm.c 2019-05-02 17:28:57.775679000 +0200 @@ -337,6 +337,36 @@ second = ev->data.l[2]; mode = 0; + if ((first == display_info->atoms[NET_WM_STATE_HIDDEN]) || + (second == display_info->atoms[NET_WM_STATE_HIDDEN])) + { + if ((action == NET_WM_STATE_ADD) && !FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED)) + { + if (CLIENT_CAN_HIDE_WINDOW (c)) + { + clientWithdraw (c, c->win_workspace, TRUE); + } + } + else if ((action == NET_WM_STATE_REMOVE) && FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED)) + { + clientShow (c, TRUE); + } + else if (action == NET_WM_STATE_TOGGLE) + { + if (FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED)) + { + clientShow (c, TRUE); + } + else + { + if (CLIENT_CAN_HIDE_WINDOW (c)) + { + clientWithdraw (c, c->win_workspace, TRUE); + } + } + } + } + if ((first == display_info->atoms[NET_WM_STATE_SHADED]) || (second == display_info->atoms[NET_WM_STATE_SHADED])) {