diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-04-11 15:17:29 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-04-11 15:17:29 +0200 |
| commit | 540d5eed469d19d2161ff157ec161e70384a80e9 (patch) | |
| tree | f2f8a0497a98d440db000d0ec82ef0febd16b5ec | |
| parent | Added tag 3.9 for changeset 55478328b242 (diff) | |
| download | dwm-540d5eed469d19d2161ff157ec161e70384a80e9.tar.gz dwm-540d5eed469d19d2161ff157ec161e70384a80e9.zip | |
make also transients floating when we do not know the main window
| -rw-r--r-- | client.c | 9 |
1 files changed, 5 insertions, 4 deletions
| @@ -173,8 +173,9 @@ killclient(const char *arg) { | |||
| 173 | 173 | ||
| 174 | void | 174 | void |
| 175 | manage(Window w, XWindowAttributes *wa) { | 175 | manage(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; |
