fixed memory leak
svn path=/trunk/kdebase/kwin/; revision=388495
This commit is contained in:
parent
e1279c6cf8
commit
e9ecc46ac0
1 changed files with 27 additions and 10 deletions
|
@ -380,7 +380,7 @@ run_fades (Display *dpy)
|
||||||
if (fade_time - now > 0)
|
if (fade_time - now > 0)
|
||||||
return;
|
return;
|
||||||
steps = 1 + (now - fade_time) / fade_delta;
|
steps = 1 + (now - fade_time) / fade_delta;
|
||||||
for (next = fades; f = next; )
|
for (next = fades; (f = next); )
|
||||||
{
|
{
|
||||||
win *w = f->w;
|
win *w = f->w;
|
||||||
next = f->next;
|
next = f->next;
|
||||||
|
@ -1169,6 +1169,8 @@ paint_all (Display *dpy, XserverRegion region)
|
||||||
0, 0, 0, 0, x, y, wid, w->titleHeight);
|
0, 0, 0, 0, x, y, wid, w->titleHeight);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!w->borderClip)
|
if (!w->borderClip)
|
||||||
|
@ -1419,7 +1421,22 @@ finish_unmap_win (Display *dpy, win *w)
|
||||||
XFixesDestroyRegion (dpy, w->borderSize);
|
XFixesDestroyRegion (dpy, w->borderSize);
|
||||||
w->borderSize = None;
|
w->borderSize = None;
|
||||||
}
|
}
|
||||||
if (w->shadow)
|
|
||||||
|
if (w->titleSize)
|
||||||
|
{
|
||||||
|
set_ignore (dpy, NextRequest (dpy));
|
||||||
|
XFixesDestroyRegion (dpy, w->titleSize);
|
||||||
|
w->titleSize = None;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (w->contentSize)
|
||||||
|
{
|
||||||
|
set_ignore (dpy, NextRequest (dpy));
|
||||||
|
XFixesDestroyRegion (dpy, w->contentSize);
|
||||||
|
w->contentSize = None;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (w->shadow)
|
||||||
{
|
{
|
||||||
XRenderFreePicture (dpy, w->shadow);
|
XRenderFreePicture (dpy, w->shadow);
|
||||||
w->shadow = None;
|
w->shadow = None;
|
||||||
|
@ -1829,8 +1846,8 @@ configure_win (Display *dpy, XConfigureEvent *ce)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
damage = XFixesCreateRegion (dpy, 0, 0);
|
damage = XFixesCreateRegion (dpy, 0, 0);
|
||||||
if (w->extents != None)
|
if (w->extents != None)
|
||||||
XFixesCopyRegion (dpy, damage, w->extents);
|
XFixesCopyRegion (dpy, damage, w->extents);
|
||||||
}
|
}
|
||||||
w->a.x = ce->x;
|
w->a.x = ce->x;
|
||||||
w->a.y = ce->y;
|
w->a.y = ce->y;
|
||||||
|
@ -1858,12 +1875,12 @@ configure_win (Display *dpy, XConfigureEvent *ce)
|
||||||
w->a.height = ce->height;
|
w->a.height = ce->height;
|
||||||
w->a.border_width = ce->border_width;
|
w->a.border_width = ce->border_width;
|
||||||
w->a.override_redirect = ce->override_redirect;
|
w->a.override_redirect = ce->override_redirect;
|
||||||
restack_win (dpy, w, ce->above);
|
restack_win (dpy, w, ce->above);
|
||||||
if (damage)
|
if (damage)
|
||||||
{
|
{
|
||||||
XserverRegion extents = win_extents (dpy, w);
|
XserverRegion extents = win_extents (dpy, w);
|
||||||
XFixesUnionRegion (dpy, damage, damage, extents);
|
XFixesUnionRegion (dpy, damage, damage, extents);
|
||||||
XFixesDestroyRegion (dpy, extents);
|
XFixesDestroyRegion (dpy, extents);
|
||||||
add_damage (dpy, damage);
|
add_damage (dpy, damage);
|
||||||
}
|
}
|
||||||
clipChanged = True;
|
clipChanged = True;
|
||||||
|
@ -2799,10 +2816,10 @@ main (int argc, char **argv)
|
||||||
} while (QLength (dpy));
|
} while (QLength (dpy));
|
||||||
if (allDamage && !autoRedirect)
|
if (allDamage && !autoRedirect)
|
||||||
{
|
{
|
||||||
static int paint;
|
/*static int paint;*/
|
||||||
paint_all (dpy, allDamage);
|
paint_all (dpy, allDamage);
|
||||||
paint++;
|
/*paint++;*/
|
||||||
XSync (dpy, False);
|
XSync (dpy, False);
|
||||||
allDamage = None;
|
allDamage = None;
|
||||||
clipChanged = False;
|
clipChanged = False;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue