aboutsummaryrefslogtreecommitdiffstats
path: root/group.c
diff options
context:
space:
mode:
authorokan2014-08-25 12:49:19 +0000
committerokan2014-08-25 12:49:19 +0000
commit69a4c46eec5a14a1d2e31092a91056655acdf8d5 (patch)
treec10c50866a4c73f0d0b589095ba3f9699563983e /group.c
parentae4c24de00ab3e9be5c41678e10d4f38d97274b2 (diff)
downloadcwm-69a4c46eec5a14a1d2e31092a91056655acdf8d5.tar.gz
Implement _NET_WM_STATE_STICKY, bound to CM-s by default; allows any
client to 'stick' to all desktops (ewmh speak) or groups - this currently has the same affect as setting a client's group to 'nogroup', with the exception that the client can also be in a group, so when un-sticking, the client will go back to its original group/desktop.
Diffstat (limited to '')
-rw-r--r--group.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/group.c b/group.c
index e341c8c..473aff8 100644
--- a/group.c
+++ b/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.94 2014/08/24 15:37:45 okan Exp $
+ * $OpenBSD: group.c,v 1.95 2014/08/25 12:49:19 okan Exp $
*/
#include <sys/param.h>
@@ -207,6 +207,8 @@ group_hidden_state(struct group_ctx *gc)
int hidden = 0, same = 0;
TAILQ_FOREACH(cc, &gc->clients, group_entry) {
+ if (cc->flags & CLIENT_STICKY)
+ continue;
if (hidden == ((cc->flags & CLIENT_HIDDEN) ? 1 : 0))
same++;
}