summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/resize.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-13 16:55:11 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-13 16:55:11 +0000
commit12e564d6e29b29e2d6b336ddaa0403835c0f4d19 (patch)
treee910001a27548146d192e4c9ff1d032523f42755 /beryl-plugins/src/resize.c
parentc52e65026189248fce1e76a101b3ddcbf646e99f (diff)
downloadmarex-dev-12e564d6e29b29e2d6b336ddaa0403835c0f4d19.tar.gz
marex-dev-12e564d6e29b29e2d6b336ddaa0403835c0f4d19.tar.bz2
resize plugin: fix outline modes for multihead configurations (fix by KristianLy, closes #901)
git-svn-id: file:///beryl/trunk@1166 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/resize.c')
-rw-r--r--beryl-plugins/src/resize.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/beryl-plugins/src/resize.c b/beryl-plugins/src/resize.c
index 32a2888..7c1c57a 100644
--- a/beryl-plugins/src/resize.c
+++ b/beryl-plugins/src/resize.c
@@ -904,15 +904,22 @@ static Bool resizePaintScreen (CompScreen * s,
if (rd->resizeMode > ResizeModeStretch && rd->w &&
!(rd->w->state & (CompWindowStateMaximizedVertMask |
CompWindowStateMaximizedHorzMask))) {
+
x1 = rd->currentX - rd->w->input.left;
x2 = rd->currentX + rd->currentWidth + rd->w->input.right;
y1 = rd->currentY - rd->w->input.top;
y2 = rd->currentY + rd->currentHeight + rd->w->input.bottom;
+
+ /* Calculate offset for multihead */
+ x1 -= s->outputDev[output].region.extents.x1;
+ y1 -= s->outputDev[output].region.extents.y1;
+ x2 -= s->outputDev[output].region.extents.x1;
+ y2 -= s->outputDev[output].region.extents.y1;
glPushMatrix ();
glTranslatef (-0.5f, -0.5f, -DEFAULT_Z_CAMERA);
- glScalef (1.0f / s->width, -1.0f / s->height, 1.0f);
- glTranslatef (0.0f, -s->height, 0.0f);
+ glScalef (1.0f / s->outputDev[output].width, -1.0f / s->outputDev[output].height, 1.0f);
+ glTranslatef (0.0f, -s->outputDev[output].height, 0.0f);
glDisableClientState (GL_TEXTURE_COORD_ARRAY);
glEnable (GL_BLEND);