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
-------------- next part --------------
--- 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;
patch looks good. thanks, -David On Tue, 2006-11-07 at 16:46 -0700, Mike Cook wrote:> 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 > _______________________________________________ > compiz mailing list > compiz@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/compiz
Reasonably Related Threads
- [PATCH] Combined checkFTB and capDirection into one checkOrientation function.
- Minor fix to multi-head changes for mixed resolutions
- [PATCH] Make outputDeviceForGeometry behave smarter when dealing with overlapping outputs. Currently, the current output is returned if some part of the rectangle is on it; otherwise the output device the rectangle center is on is returned. This works
- updating the AUTHORS file
- Patch to wobbly snap for outputs