event.c/newwindow(): Use XGetRootWindowAttributes instead of client->screen to get desktop dimensions. This is needed to proprely size a keyboard-created window when using a smaller framebuffer size than the physical display.
This commit is contained in:
parent
2da43562b5
commit
8ffa8d334b
1 changed files with 4 additions and 1 deletions
5
event.c
5
event.c
|
@ -271,6 +271,9 @@ newwindow(XCreateWindowEvent *e)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
ScreenInfo *s;
|
ScreenInfo *s;
|
||||||
|
static XWindowAttributes ra;
|
||||||
|
XGetWindowAttributes(dpy, DefaultRootWindow(dpy), &ra);
|
||||||
|
|
||||||
|
|
||||||
/* we don't set curtime as nothing here uses it */
|
/* we don't set curtime as nothing here uses it */
|
||||||
if(e->override_redirect)
|
if(e->override_redirect)
|
||||||
|
@ -289,7 +292,7 @@ newwindow(XCreateWindowEvent *e)
|
||||||
if (kbLaunch)
|
if (kbLaunch)
|
||||||
{
|
{
|
||||||
usleep(100000);
|
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;
|
kbLaunch = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue