--- ../old/xcompmgr-1.1.1+cvs.20041109/xcompmgr.c 2004-10-16 19:53:09.000000000 -0300 +++ xcompmgr.c 2006-03-10 14:36:48.000000000 -0300 @@ -189,6 +189,7 @@ Bool fadeWindows = False; Bool excludeDockShadows = False; Bool fadeTrans = False; +Bool noFadeNormal = False; Bool autoRedirect = False; @@ -198,6 +199,13 @@ unsigned char *shadowTop = NULL; int +can_fade(win *w) +{ + return !noFadeNormal || (w->a.width*w->a.height < 360*360); +} + + +int get_time_in_milliseconds () { struct timeval tv; @@ -257,7 +265,7 @@ void (*callback) (Display *dpy, win *w, Bool gone), Bool gone, Bool exec_callback, Bool override) { - fade *f; + fade *f; f = find_fade (w); if (!f) @@ -1180,7 +1188,7 @@ #endif w->damaged = 0; - if (fade && fadeWindows) + if (fade && fadeWindows && can_fade(w)) set_fade (dpy, w, 0, get_opacity_percent (dpy, w, 1.0), fade_in_step, 0, False, True, True); } @@ -1252,7 +1260,7 @@ return; w->a.map_state = IsUnmapped; #if HAS_NAME_WINDOW_PIXMAP - if (w->pixmap && fade && fadeWindows) + if (w->pixmap && fade && fadeWindows && can_fade(w)) set_fade (dpy, w, w->opacity*1.0/OPAQUE, 0.0, fade_out_step, unmap_callback, False, False, True); else #endif @@ -1638,7 +1646,7 @@ { win *w = find_win (dpy, id); #if HAS_NAME_WINDOW_PIXMAP - if (w && w->pixmap && fade && fadeWindows) + if (w && w->pixmap && fade && fadeWindows && can_fade(w)) set_fade (dpy, w, w->opacity*1.0/OPAQUE, 0.0, fade_out_step, destroy_callback, gone, False, True); else #endif @@ -1715,7 +1723,7 @@ w->a.height <= w->damage_bounds.y + w->damage_bounds.height) { clipChanged = True; - if (fadeWindows) + if (fadeWindows && can_fade(w)) set_fade (dpy, w, 0, get_opacity_percent (dpy, w, 1.0), fade_in_step, 0, False, True, True); w->usable = True; } @@ -1879,7 +1887,7 @@ char *display = 0; int o; - while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:scnfFCaS")) != -1) + while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:scnfFCaSN")) != -1) { switch (o) { case 'd': @@ -1936,6 +1944,9 @@ case 't': shadowOffsetY = atoi (optarg); break; + case 'N': + noFadeNormal = True; + break; default: usage (argv[0]); break;