diff --git a/event.c b/event.c index d6f9425..6e1f493 100755 --- a/event.c +++ b/event.c @@ -271,6 +271,9 @@ newwindow(XCreateWindowEvent *e) { Client *c; ScreenInfo *s; + static XWindowAttributes ra; + XGetWindowAttributes(dpy, DefaultRootWindow(dpy), &ra); + /* we don't set curtime as nothing here uses it */ if(e->override_redirect) @@ -289,7 +292,7 @@ newwindow(XCreateWindowEvent *e) if (kbLaunch) { usleep(100000); - quickreshape(c, c->screen->width/5, c->screen->height/5, 3*c->screen->width/5, 3*c->screen->height/5); + quickreshape(c, ra.width/5, ra.height/5, 3*ra.width/5, 3*ra.height/5); kbLaunch = 0; } }