about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--client.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/client.c b/client.c
index 282ad53..0d2ab9a 100644
--- a/client.c
+++ b/client.c
@@ -173,8 +173,9 @@ killclient(const char *arg) {
 
 void
 manage(Window w, XWindowAttributes *wa) {
-	Client *c, *t;
+	Client *c, *t = NULL;
 	Window trans;
+	Status rettrans;
 	XWindowChanges wc;
 
 	c = emallocz(sizeof(Client));
@@ -203,17 +204,17 @@ manage(Window w, XWindowAttributes *wa) {
 	updatesizehints(c);
 	XSelectInput(dpy, w,
 		StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
-	XGetTransientForHint(dpy, w, &trans);
 	grabbuttons(c, False);
 	wc.border_width = c->border;
 	XConfigureWindow(dpy, w, CWBorderWidth, &wc);
 	XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
 	configure(c); /* propagates border_width, if size doesn't change */
 	updatetitle(c);
-	for(t = clients; t && t->win != trans; t = t->next);
+	if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success))
+		for(t = clients; t && t->win != trans; t = t->next);
 	settags(c, t);
 	if(!c->isfloating)
-		c->isfloating = (t != NULL) || c->isfixed;
+		c->isfloating = (rettrans == Success) || c->isfixed;
 	attach(c);
 	attachstack(c);
 	c->isbanned = True;
-23 18:31:26 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2017-09-23 18:41:47 -0700 4002' href='/akkartik/mu/commit/tangle.mu?h=hlt&id=72cf994869e19f6bdc4678e1122f0082d07d4a11'>72cf9948 ^
20d1c905 ^
72cf9948 ^
20d1c905 ^

72cf9948 ^
20d1c905 ^
72cf9948 ^






20d1c905 ^

1ead3562 ^
192d59d3 ^
d66e2783 ^
192d59d3 ^
20d1c905 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36