summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/resize.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-05 18:08:53 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-05 18:08:53 +0000
commitf72721c191f4f35912fab4738fb43786a04d83df (patch)
tree51c55e3483bf0be1595478275e585685a1ba69b5 /beryl-plugins/src/resize.c
parent0f7d0001cc085131d07ce9234664c45982048b8f (diff)
downloadmarex-dev-f72721c191f4f35912fab4738fb43786a04d83df.tar.gz
marex-dev-f72721c191f4f35912fab4738fb43786a04d83df.tar.bz2
group & resize plugins: fixed outline being drawn multiple times when using transparent cube
git-svn-id: file:///beryl/trunk@3681 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/resize.c')
-rw-r--r--beryl-plugins/src/resize.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/beryl-plugins/src/resize.c b/beryl-plugins/src/resize.c
index f68f1b9..e1f6b73 100644
--- a/beryl-plugins/src/resize.c
+++ b/beryl-plugins/src/resize.c
@@ -154,7 +154,8 @@ typedef struct _ResizeDisplay
typedef struct _ResizeScreen
{
int grabIndex;
- Bool wasTransformed;
+ Bool painted;
+ int x, y;
PaintWindowProc paintWindow;
PreparePaintScreenProc preparePaintScreen;
@@ -1028,10 +1029,6 @@ resizePaintOutline(CompScreen * s, const ScreenPaintAttrib * sa, int output,
if (rd->resizeMode > ResizeModeStretch && rd->w &&
!(rd->w->state & MAXIMIZE_STATE) && rs->grabIndex)
{
-
- if (transformed)
- rs->wasTransformed = TRUE;
-
x1 = rd->currentX - rd->w->input.left;
x2 = rd->currentX + rd->currentWidth + rd->w->input.right;
y1 = rd->currentY - rd->w->input.top;
@@ -1086,16 +1083,18 @@ resizePaintScreen(CompScreen * s,
RESIZE_SCREEN(s);
RESIZE_DISPLAY(s->display);
+ rs->painted = FALSE;
+ rs->x = s->x;
+ rs->y = s->y;
+
if (rd->w && rs->grabIndex && rd->resizeMode == ResizeModeStretch)
mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK;
- rs->wasTransformed = FALSE;
-
UNWRAP(rs, s, paintScreen);
status = (*s->paintScreen) (s, sAttrib, region, output, mask);
WRAP(rs, s, paintScreen, resizePaintScreen);
- if (status && !rs->wasTransformed)
+ if (status && !rs->painted)
resizePaintOutline(s, sAttrib, output, FALSE);
return status;
@@ -1111,7 +1110,10 @@ resizePaintTransformedScreen(CompScreen * s, const ScreenPaintAttrib * sa,
(*s->paintTransformedScreen) (s, sa, region, output, mask);
WRAP(rs, s, paintTransformedScreen, resizePaintTransformedScreen);
- resizePaintOutline(s, sa, output, TRUE);
+ if ((rs->x == s->x) && (rs->y == s->y)) {
+ rs->painted = TRUE;
+ resizePaintOutline(s, sa, output, TRUE);
+ }
}
static void resizeDonePaintScreen(CompScreen * s)