commit bf4baf24dc31b998eb3cb7f4b622bf014b7077e2
parent 20955d76c6da03b11da98a914363549ac27816c5
Author: Kris Maglione <bsdaemon@wmii.de>
Date: Fri, 23 Jun 2006 01:43:28 -0400
Prevent clients from automatically floating on startup after a floating window is mapped.
Diffstat:
3 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/cmd/wm/view.c b/cmd/wm/view.c
@@ -203,6 +203,8 @@ attach_to_view(View *v, Client *c)
if(c->trans || c->floating || c->fixedsize
|| (c->rect.width == rect.width && c->rect.height == rect.height))
a = v->area;
+ else if(starting && v->sel == v->area)
+ a = v->area->next;
else
a = v->sel;
attach_to_area(a, c, False);
diff --git a/cmd/wm/wm.c b/cmd/wm/wm.c
@@ -242,6 +242,8 @@ main(int argc, char *argv[])
}
}
+ starting = True;
+
blz.display = XOpenDisplay(0);
if(!blz.display) {
fputs("wmiiwm: cannot open display\n", stderr);
@@ -346,6 +348,8 @@ main(int argc, char *argv[])
draw_bar();
scan_wins();
+ starting = False;
+
/* main event loop */
errstr = ixp_server_loop(&srv);
if(errstr)
diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h
@@ -186,6 +186,7 @@ Cursor cursor[CurLast];
unsigned int valid_mask;
unsigned int num_lock_mask;
Bool sel_screen;
+Bool starting;
Pixmap pmap;
void (*handler[LASTEvent]) (XEvent *);