Re: [compiz] A patch for minimize plugin.
On 2/7/07, Bellegarde Cedric <[EMAIL PROTECTED]> wrote: On Wednesday 07 February 2007 02:02:26 David Reveman wrote: > minimize plugin modifying opacity attribute like that is wrong. fade > plugin should be modified if you want to disable fading when windows are > minimized. It should be cool if you work on this Stjepan ;) Currently, i have to disable Normal windows in fade configuration if i want minimize effect to be draw correctly... At some point I had the issue in previous compiz version (now using latest git version) and for me it was solved by loading plugins in a certain order. I now have the ordering as follows: gconf, png, decoration, move, resize, dbus, fade, minimize, cube, switcher, place, scale, screenshot, rotate, zoom. Also, this is on Xorg 7.2/AIGLX/Intel 945GMA. Cheers, ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] A patch for minimize plugin.
On Wednesday 07 February 2007 02:02:26 David Reveman wrote: > minimize plugin modifying opacity attribute like that is wrong. fade > plugin should be modified if you want to disable fading when windows are > minimized. It should be cool if you work on this Stjepan ;) Currently, i have to disable Normal windows in fade configuration if i want minimize effect to be draw correctly... Cedric ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] A patch for minimize plugin.
On Sun, 2007-01-28 at 17:31 +0100, Stjepan Glavina wrote: > I've added a new option in minimize plugin, called "Disable Fading". > To prevent tearing, damageScreen is used minDonePaintScreen (only if the > option is used). minimize plugin modifying opacity attribute like that is wrong. fade plugin should be modified if you want to disable fading when windows are minimized. Adding a call to damageScreen like that is also wrong. That it prevents tearing for you doesn't justify it. I assume that it prevents tearing because your driver doesn't support GLX_SGI_video_sync, which allow compiz to synchronize partial buffer swaps to the vblank. You can't replace efficient redrawing of part of the screen with fullscreen redrawing to workaround missing features a specific OpenGL implementation. - David ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
[compiz] A patch for minimize plugin.
I've added a new option in minimize plugin, called "Disable Fading". To prevent tearing, damageScreen is used minDonePaintScreen (only if the option is used). The patch is attached. --- minimize_orig.c 2007-01-27 08:30:23.0 +0100 +++ minimize.c 2007-01-28 17:21:23.0 +0100 @@ -45,6 +45,8 @@ #define MIN_SHADE_RESISTANCE_MIN 0 #define MIN_SHADE_RESISTANCE_MAX 100 +#define MIN_DISABLE_FADING_DEFAULT FALSE + static char *winType[] = { N_("Toolbar"), N_("Utility"), @@ -66,7 +68,8 @@ #define MIN_SCREEN_OPTION_TIMESTEP 1 #define MIN_SCREEN_OPTION_WINDOW_TYPE 2 #define MIN_SCREEN_OPTION_SHADE_RESISTANCE 3 -#define MIN_SCREEN_OPTION_NUM 4 +#define MIN_SCREEN_OPTION_DISABLE_FADING 4 +#define MIN_SCREEN_OPTION_NUM 5 typedef struct _MinScreen { int windowPrivateIndex; @@ -185,6 +188,10 @@ return TRUE; } + break; + case MIN_SCREEN_OPTION_DISABLE_FADING: + if (compSetBoolOption (o, value)) + return TRUE; default: break; } @@ -242,6 +249,13 @@ o->value.i = MIN_SHADE_RESISTANCE_DEFAULT; o->rest.i.min = MIN_SHADE_RESISTANCE_MIN; o->rest.i.max = MIN_SHADE_RESISTANCE_MAX; + +o = &ms->opt[MIN_SCREEN_OPTION_DISABLE_FADING]; +o->name = "disable_fading"; +o->shortDesc = N_("Disable Fading"); +o->longDesc = N_("Disable fading when minimizing"); +o->type = CompOptionTypeBool; +o->value.b= MIN_DISABLE_FADING_DEFAULT; } static void @@ -585,6 +599,9 @@ UNWRAP (ms, s, donePaintScreen); (*s->donePaintScreen) (s); WRAP (ms, s, donePaintScreen, minDonePaintScreen); + +if (ms->opt[MIN_SCREEN_OPTION_DISABLE_FADING].value.b) +damageScreen(s); } static Bool @@ -644,9 +661,11 @@ glPushMatrix (); glLoadMatrixf (wTransform.m); + if (ms->opt[MIN_SCREEN_OPTION_DISABLE_FADING].value.b) + fragment.opacity = OPAQUE; + (*s->drawWindow) (w, &wTransform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK); - glPopMatrix (); } else ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz