Hey, David, with the latest changes for output-specific zoom it wasn't focusing
properly for me with mixed resolutions.  I think this patch corrects that.

(Oh, and on my previous comment I meant struts and not extents, if that was
confusing to anyone.  It was to me when I re-read it, heh.)

...MC
--- plugins/zoom.c
+++ plugins/zoom.c
@@ -480,8 +480,12 @@
 
                if (zs->currentZoom == 1.0f)
                {
-                   zs->xTranslate = (x - s->width  / 2) / (s->width  * 2.0f);
-                   zs->yTranslate = (y - s->height / 2) / (s->height * 2.0f);
+                   CompOutput *o = &s->outputDev[zs->zoomOutput];
+
+                   zs->xTranslate = ((x - o->region.extents.x1) - o->width  / 
2) /
+                       (s->width  * 2.0f);
+                   zs->yTranslate = ((y - o->region.extents.y1) - o->height / 
2) /
+                       (s->height * 2.0f);
 
                    zs->xTranslate /= zs->newZoom;
                    zs->yTranslate /= zs->newZoom;
_______________________________________________
compiz mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/compiz

Reply via email to