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 */
if (need_dequeue)
dequeue_fade (dpy, f);
} }
/* Must do this last as it might destroy f->w in callbacks */
if (need_dequeue)
dequeue_fade (dpy, f);
determine_mode (dpy, w); determine_mode (dpy, w);
} }
fade_time = now + fade_delta; fade_time = now + fade_delta;
@ -1467,7 +1467,7 @@ unmap_win (Display *dpy, Window id, Bool fade)
w->a.map_state = IsUnmapped; w->a.map_state = IsUnmapped;
#if HAS_NAME_WINDOW_PIXMAP #if HAS_NAME_WINDOW_PIXMAP
if (w->pixmap && fade && fadeWindows) if (w->pixmap && fade && fadeWindows)
set_fade (dpy, w, w->opacity*1.0/OPAQUE, 0.0, fade_out_step, unmap_callback, False, False, True, True); set_fade (dpy, w, w->opacity*1.0/OPAQUE, 0.0, fade_out_step, unmap_callback, False, False, True, True);
else else
#endif #endif
finish_unmap_win (dpy, w); finish_unmap_win (dpy, w);
@ -1660,7 +1660,7 @@ determine_mode(Display *dpy, win *w)
format = XRenderFindVisualFormat (dpy, w->a.visual); format = XRenderFindVisualFormat (dpy, w->a.visual);
} }
if (!disable_argb && format && format->type == PictTypeDirect && format->direct.alphaMask) if (!disable_argb && format && format->type == PictTypeDirect && format->direct.alphaMask)
{ {
mode = WINDOW_ARGB; mode = WINDOW_ARGB;
} }
@ -1777,12 +1777,12 @@ add_win (Display *dpy, Window id, Window prev)
XShapeSelectInput( dpy, id, ShapeNotifyMask ); XShapeSelectInput( dpy, id, ShapeNotifyMask );
/* moved mode setting to one place */ /* moved mode setting to one place */
new->opacity = get_opacity_prop (dpy, new, OPAQUE); new->opacity = get_opacity_prop (dpy, new, OPAQUE);
new->shadowSize = get_shadow_prop (dpy, new); new->shadowSize = get_shadow_prop (dpy, new);
new->shapable = get_shapable_prop(dpy, new); new->shapable = get_shapable_prop(dpy, new);
new->titleHeight = get_titleHeight_prop(dpy, new); new->titleHeight = get_titleHeight_prop(dpy, new);
new->windowType = determine_wintype (dpy, new->id); new->windowType = determine_wintype (dpy, new->id);
determine_mode (dpy, new); determine_mode (dpy, new);
new->next = *p; new->next = *p;
*p = new; *p = new;
@ -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);