From 31f5dfdc37568eebafea134147fbacc83b3e5183 Mon Sep 17 00:00:00 2001 From: Ryan McBride Date: Thu, 1 Oct 2009 09:44:09 +0000 Subject: [PATCH] Actually, DON'T set the ws->r to a bogus value. 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 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scrotwm.c b/scrotwm.c index 2770962..d6a984c 100644 --- 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; -- 1.7.10.4