aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-01-19 21:14:21 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-01-19 21:20:12 +0200
commitb08395a881c10d7e418edba31acda09c53ee1a00 (patch)
tree1cd8f883759074d6a01b3a27fd5f7bd53d240c16 /monsterwm.c
parentbd36ff5a01becf4ed572563e47da1c7c35f92e93 (diff)
rule to spawn specified clients as floating
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/monsterwm.c b/monsterwm.c
index 61844d3..7fed326 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -104,6 +104,7 @@ typedef struct {
const char *class;
const int desktop;
const Bool follow;
+ const Bool floating;
} AppRule;
/* Functions */
@@ -467,7 +468,7 @@ void maprequest(XEvent *e) {
if (XGetWindowAttributes(dis, e->xmaprequest.window, &wa) && wa.override_redirect) return;
if (wintoclient(e->xmaprequest.window)) return;
- Bool follow = False;
+ Bool follow = False, floating = False;
int cd = current_desktop, newdsk = current_desktop;
XClassHint ch = {0, 0};
if (XGetClassHint(dis, e->xmaprequest.window, &ch))
@@ -475,6 +476,7 @@ void maprequest(XEvent *e) {
if (!strcmp(ch.res_class, rules[i].class) || !strcmp(ch.res_name, rules[i].class)) {
follow = rules[i].follow;
newdsk = rules[i].desktop;
+ floating = rules[i].floating;
break;
}
if (ch.res_class) XFree(ch.res_class);
@@ -486,6 +488,7 @@ void maprequest(XEvent *e) {
Window w;
current->istransient = XGetTransientForHint(dis, current->win, &w);
+ current->isfloating = floating;
int di; unsigned long dl; unsigned char *state = NULL; Atom da;
if (XGetWindowProperty(dis, current->win, netatoms[NET_WM_STATE], 0L, sizeof da,