All pastes #581389 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-06-21 14:26 UTC
rendered paste body
diff --git a/scalefilter.c b/scalefilter.c
index abde14e..41bda2b 100644
--- a/scalefilter.c
+++ b/scalefilter.c
@@ -70,7 +70,8 @@ typedef struct _ScaleFilterDisplay {
 
 typedef struct _ScaleFilterScreen {
     PaintOutputProc paintOutput;
-    DrawWindowProc drawWindow;
+    DrawWindowProc  drawWindow;
+    PaintWindowProc paintWindow;
 
     CompMatch scaleMatch;
     Bool matchApplied;
@@ -721,6 +722,34 @@ scalefilterPaintOutput (CompScreen              *s,
 }
 
 static Bool
+scalefilterPaintWindow (CompWindow * w,
+			const WindowPaintAttrib * attrib,
+			const CompTransform * transform,
+			Region region, unsigned int mask)
+{
+    CompScreen *s = w->screen;
+    Bool status;
+
+    FILTER_SCREEN (s);
+
+    if (fs->matchApplied ||
+	(fs->filterInfo && fs->filterInfo->filterStringLength))
+    {
+	SCALE_WINDOW (w);
+
+	if (!sw->slot)
+	    mask |= PAINT_WINDOW_TRANSLUCENT_MASK;
+    }
+
+    UNWRAP (fs, s, paintWindow);
+    status = (*s->paintWindow) (w, attrib, transform, region, mask);
+    WRAP (fs, s, paintWindow, scalefilterPaintWindow);
+
+    return status;
+}
+
+
+static Bool
 scalefilterDrawWindow (CompWindow	     *w,
 	     	       const CompTransform  *transform,
        		       const FragmentAttrib *attrib,
@@ -855,6 +884,7 @@ scalefilterInitScreen (CompPlugin *p,
 
     WRAP (fs, s, paintOutput, scalefilterPaintOutput);
     WRAP (fs, s, drawWindow, scalefilterDrawWindow);
+    WRAP (fs, s, paintWindow, scalefilterPaintWindow);
 
     scalefilterSetFontBoldNotify (s, scalefilterScreenOptionChanged);
     scalefilterSetFontSizeNotify (s, scalefilterScreenOptionChanged);
@@ -875,6 +905,7 @@ scalefilterFiniScreen (CompPlugin *p,
 
     UNWRAP (fs, s, paintOutput);
     UNWRAP (fs, s, drawWindow);
+    UNWRAP (fs, s, paintWindow);
 
     if (fs->filterInfo)
     {