summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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) {
173 173
174void 174void
175manage(Window w, XWindowAttributes *wa) { 175manage(Window w, XWindowAttributes *wa) {
176 Client *c, *t; 176 Client *c, *t = NULL;
177 Window trans; 177 Window trans;
178 Status rettrans;
178 XWindowChanges wc; 179 XWindowChanges wc;
179 180
180 c = emallocz(sizeof(Client)); 181 c = emallocz(sizeof(Client));
@@ -203,17 +204,17 @@ manage(Window w, XWindowAttributes *wa) {
203 updatesizehints(c); 204 updatesizehints(c);
204 XSelectInput(dpy, w, 205 XSelectInput(dpy, w,
205 StructureNotifyMask | PropertyChangeMask | EnterWindowMask); 206 StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
206 XGetTransientForHint(dpy, w, &trans);
207 grabbuttons(c, False); 207 grabbuttons(c, False);
208 wc.border_width = c->border; 208 wc.border_width = c->border;
209 XConfigureWindow(dpy, w, CWBorderWidth, &wc); 209 XConfigureWindow(dpy, w, CWBorderWidth, &wc);
210 XSetWindowBorder(dpy, w, dc.norm[ColBorder]); 210 XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
211 configure(c); /* propagates border_width, if size doesn't change */ 211 configure(c); /* propagates border_width, if size doesn't change */
212 updatetitle(c); 212 updatetitle(c);
213 for(t = clients; t && t->win != trans; t = t->next); 213 if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success))
214 for(t = clients; t && t->win != trans; t = t->next);
214 settags(c, t); 215 settags(c, t);
215 if(!c->isfloating) 216 if(!c->isfloating)
216 c->isfloating = (t != NULL) || c->isfixed; 217 c->isfloating = (rettrans == Success) || c->isfixed;
217 attach(c); 218 attach(c);
218 attachstack(c); 219 attachstack(c);
219 c->isbanned = True; 220 c->isbanned = True;