JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Actually, DON'T set the ws->r to a bogus value.
authorRyan McBride <mcbride@countersiege.com>
Thu, 1 Oct 2009 09:44:09 +0000 (09:44 +0000)
committerRyan McBride <mcbride@countersiege.com>
Thu, 1 Oct 2009 09:44:09 +0000 (09:44 +0000)
It's perfectly legal for us to start managing a window in a workspace
that's not active - for example, when we start a process and change
workspaces before the window is created, or when scrotwm restarts.

scrotwm.c

index 2770962..d6a984c 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -3255,10 +3255,6 @@ manage_window(Window id)
                                }
        }
 
-       /* shouldn't happen but does... */
-       if (ws->r == NULL)
-               ws->r = r; /* use found r since it isn't filled in */
-
        /* set up the window layout */
        win->id = id;
        win->ws = ws;
@@ -3305,7 +3301,7 @@ manage_window(Window id)
                        mask |= CWY;
                }
                if (win->g.w + win->g.x > WIDTH(r)) {
-                       win->g.x = wc.x = WIDTH(win->ws->r) - win->g.w - 2;
+                       win->g.x = wc.x = WIDTH(r) - win->g.w - 2;
                        mask |= CWX;
                }
                border_me = 1;