Wmfs: Free all GC everywhere

This commit is contained in:
Martin Duquesnoy 2009-06-19 17:59:59 +02:00
parent a80f6908b7
commit f6011776c2
2 changed files with 6 additions and 0 deletions

View File

@ -153,6 +153,7 @@ mouse_move(Client *c)
client_update_attributes(c);
XUngrabPointer(dpy, CurrentTime);
XUngrabServer(dpy);
XFreeGC(dpy, gci);
return;
}
@ -204,6 +205,7 @@ mouse_resize(Client *c)
if(ev.type == MotionNotify)
{
/* To resize MWFACT in tile mode */
if(c->tile && tags[selscreen][seltag[selscreen]].layout.func != grid)
{
if(tags[selscreen][seltag[selscreen]].layout.func == tile)
@ -220,6 +222,7 @@ mouse_resize(Client *c)
tags[selscreen][seltag[selscreen]].mwfact = (mwf < 0.05) ? 0.05 : ((mwf > 0.95) ? 0.95 : mwf);
}
/* Free mode */
else if(!c->tile)
{
mouse_dragborder(geo, gci);
@ -249,6 +252,7 @@ mouse_resize(Client *c)
client_update_attributes(c);
XUngrabPointer(dpy, CurrentTime);
XUngrabServer(dpy);
XFreeGC(dpy, gci);
return;
}

View File

@ -103,6 +103,8 @@ quit(void)
XFreeCursor(dpy, cursor[CurNormal]);
XFreeCursor(dpy, cursor[CurMove]);
XFreeCursor(dpy, cursor[CurResize]);
XFreeGC(dpy, gc);
XFreeGC(dpy, gc_stipple);
infobar_destroy();
IFREE(sgeo);