JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Make sure we open transient in same ws as parent; this does not work 100%
authorMarco Peereboom <marco@conformal.com>
Tue, 29 Sep 2009 22:35:02 +0000 (22:35 +0000)
committerMarco Peereboom <marco@conformal.com>
Tue, 29 Sep 2009 22:35:02 +0000 (22:35 +0000)
on intel xrandr.  It seems that the intel driver switched the geometry
so that 0.0 isnt in the top left corner or something.

scrotwm.c

index a3aba41..0dda010 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -3191,7 +3191,7 @@ manage_window(Window id)
 {
        Window                  trans;
        struct workspace        *ws;
-       struct ws_win           *win;
+       struct ws_win           *win, *ww;
        int                     format, i, ws_idx, n;
        unsigned long           nitems, bytes;
        Atom                    ws_idx_atom = 0, type;
@@ -3244,8 +3244,17 @@ manage_window(Window id)
                            errstr, prop);
                }
                ws = &r->s->ws[ws_idx];
-       } else
+       } else {
                ws = r->ws;
+               /* this should launch transients in the same ws as parent */
+               /* XXX doesn't work for intel xrandr */
+               if (id && trans) {
+                       if ((ww = find_window(trans)) != NULL) {
+                               ws = ww->ws;
+                               r = ws->r;
+                       }
+               }
+       }
 
        /* set up the window layout */
        win->id = id;