add guard against mangling root window in quickreshape()
This commit is contained in:
parent
ae6903668b
commit
467f53aa0b
1 changed files with 3 additions and 1 deletions
4
key.c
4
key.c
|
@ -115,7 +115,7 @@ keypress(XKeyEvent *e)
|
||||||
alttab(e->state&ShiftMask);
|
alttab(e->state&ShiftMask);
|
||||||
if(e->keycode == dcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
if(e->keycode == dcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||||
delete(current, 0);
|
delete(current, 0);
|
||||||
if(e->keycode == icode && (e->state&SHORTCUTMOD) == (MODBITS))
|
if (e->keycode == icode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||||
hide(current);
|
hide(current);
|
||||||
if (e->keycode == vcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
if (e->keycode == vcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||||
move(current, Button3);
|
move(current, Button3);
|
||||||
|
@ -191,6 +191,8 @@ keyrelease(XKeyEvent *e)
|
||||||
void
|
void
|
||||||
quickreshape(Client *c, int x, int y, int dx, int dy)
|
quickreshape(Client *c, int x, int y, int dx, int dy)
|
||||||
{
|
{
|
||||||
|
if (c == 0)
|
||||||
|
return;
|
||||||
XMoveResizeWindow(dpy, c->parent, x,y, dx, dy);
|
XMoveResizeWindow(dpy, c->parent, x,y, dx, dy);
|
||||||
c->x = x + BORDER;
|
c->x = x + BORDER;
|
||||||
c->y = y + BORDER;
|
c->y = y + BORDER;
|
||||||
|
|
Loading…
Reference in a new issue