Plug 3 memory leaks, and make fading windows always draw so that fast desktop changing doesn't make windows become invisible.
This commit is contained in:
parent
27ca5f291c
commit
dde2509cdc
27
xcompmgr.c
27
xcompmgr.c
|
@ -312,8 +312,19 @@ set_fade (Display *dpy, win *w, double start, double finish, double step,
|
||||||
{
|
{
|
||||||
XRenderFreePicture (dpy, w->shadow);
|
XRenderFreePicture (dpy, w->shadow);
|
||||||
w->shadow = None;
|
w->shadow = None;
|
||||||
w->extents = win_extents (dpy, w);
|
|
||||||
|
if (w->extents != None)
|
||||||
|
XFixesDestroyRegion (dpy, w->extents);
|
||||||
|
|
||||||
|
/* rebuild the shadow */
|
||||||
|
w->extents = win_extents (dpy, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* fading windows need to be drawn, mark them as damaged.
|
||||||
|
when a window maps, if it tries to fade in but it already at the right
|
||||||
|
opacity (map/unmap/map fast) then it will never get drawn without this
|
||||||
|
until it repaints */
|
||||||
|
w->damaged = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -382,6 +393,11 @@ run_fades (Display *dpy)
|
||||||
{
|
{
|
||||||
XRenderFreePicture (dpy, w->shadow);
|
XRenderFreePicture (dpy, w->shadow);
|
||||||
w->shadow = None;
|
w->shadow = None;
|
||||||
|
|
||||||
|
if (w->extents != None)
|
||||||
|
XFixesDestroyRegion (dpy, w->extents);
|
||||||
|
|
||||||
|
/* rebuild the shadow */
|
||||||
w->extents = win_extents(dpy, w);
|
w->extents = win_extents(dpy, w);
|
||||||
}
|
}
|
||||||
/* Must do this last as it might destroy f->w in callbacks */
|
/* Must do this last as it might destroy f->w in callbacks */
|
||||||
|
@ -2279,12 +2295,17 @@ main (int argc, char **argv)
|
||||||
fade_out_step, 0, True, False);
|
fade_out_step, 0, True, False);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
w->opacity = get_opacity_prop(dpy, w, OPAQUE);
|
w->opacity = get_opacity_prop(dpy, w, OPAQUE);
|
||||||
determine_mode(dpy, w);
|
determine_mode(dpy, w);
|
||||||
if (w->shadow)
|
if (w->shadow)
|
||||||
{
|
{
|
||||||
XRenderFreePicture (dpy, w->shadow);
|
XRenderFreePicture (dpy, w->shadow);
|
||||||
w->shadow = None;
|
w->shadow = None;
|
||||||
|
|
||||||
|
if (w->extents != None)
|
||||||
|
XFixesDestroyRegion (dpy, w->extents);
|
||||||
|
|
||||||
|
/* rebuild the shadow */
|
||||||
w->extents = win_extents (dpy, w);
|
w->extents = win_extents (dpy, w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue