BUGS:99800

fixes problem with missing fade deques on unshadowed windows

svn path=/trunk/kdebase/kwin/; revision=391030
This commit is contained in:
Thomas Lübking 2005-02-19 21:33:14 +00:00
parent 8ae13aede0
commit f9d8223e22

View file

@ -417,10 +417,10 @@ run_fades (Display *dpy)
XRenderFreePicture (dpy, w->shadow); XRenderFreePicture (dpy, w->shadow);
w->shadow = None; w->shadow = None;
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 */
if (need_dequeue) if (need_dequeue)
dequeue_fade (dpy, f); dequeue_fade (dpy, f);
}
determine_mode (dpy, w); determine_mode (dpy, w);
} }
fade_time = now + fade_delta; fade_time = now + fade_delta;
@ -2534,7 +2534,7 @@ main (int argc, char **argv)
exit (1); exit (1);
} }
fprintf(stderr, "Started"); fprintf(stderr, "Started\n");
/* get atoms */ /* get atoms */
shadowAtom = XInternAtom (dpy, SHADOW_PROP, False); shadowAtom = XInternAtom (dpy, SHADOW_PROP, False);
opacityAtom = XInternAtom (dpy, OPACITY_PROP, False); opacityAtom = XInternAtom (dpy, OPACITY_PROP, False);
@ -2740,10 +2740,10 @@ main (int argc, char **argv)
{ {
/* reset mode and redraw window */ /* reset mode and redraw window */
win * w = find_win(dpy, ev.xproperty.window); win * w = find_win(dpy, ev.xproperty.window);
unsigned int oldShadowSize = w->shadowSize;
unsigned int tmp;
if (w) if (w)
{ {
unsigned int tmp;
unsigned int oldShadowSize = w->shadowSize;
if (ev.xproperty.atom == opacityAtom) if (ev.xproperty.atom == opacityAtom)
{ {
tmp = get_opacity_prop(dpy, w, OPAQUE); tmp = get_opacity_prop(dpy, w, OPAQUE);
@ -2751,8 +2751,7 @@ main (int argc, char **argv)
break; /*skip if opacity does not change*/ break; /*skip if opacity does not change*/
if (fadeTrans) if (fadeTrans)
{ {
set_fade (dpy, w, w->opacity*1.0/OPAQUE, (tmp*1.0)/OPAQUE, set_fade (dpy, w, w->opacity*1.0/OPAQUE, (tmp*1.0)/OPAQUE, fade_out_step, 0, False, False, True, False);
fade_out_step, 0, False, True, True, False);
break; break;
} }
else else
@ -2764,6 +2763,8 @@ main (int argc, char **argv)
if (tmp == w->shadowSize) if (tmp == w->shadowSize)
break; /*skip if shadow does not change*/ break; /*skip if shadow does not change*/
w->shadowSize = tmp; w->shadowSize = tmp;
/* if (w->isInFade)
break;*/
} }
if (w->shadow) if (w->shadow)
{ {
@ -2785,7 +2786,10 @@ main (int argc, char **argv)
break; break;
default: default:
if (ev.type == damage_event + XDamageNotify) if (ev.type == damage_event + XDamageNotify)
{
/* printf("damaging win: %u\n",ev.xany.window);*/
damage_win (dpy, (XDamageNotifyEvent *) &ev); damage_win (dpy, (XDamageNotifyEvent *) &ev);
}
else if (ev.type == shapeEvent) else if (ev.type == shapeEvent)
{ {
win * w = find_win(dpy, ev.xany.window); win * w = find_win(dpy, ev.xany.window);