On 03/10/2010 01:22 PM, Ola Lundqvist wrote:
Very good to know. In that case I think we should wait some more
until we have determined whether it is possible to change the other
ones as well. I think half scaling is more confusing that all scaling
even though it may be worth applying your nice _little_ patch.
Oh! When I reviewed the code I realized I missed a bit. New patch
attached.
Ben
diff -ur vnc4-4.1.1+X4.3.0/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc vnc4-4.1.1+X4.3.0+572678/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc
--- vnc4-4.1.1+X4.3.0/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2010-03-10 12:54:58.000000000 -0400
+++ vnc4-4.1.1+X4.3.0+572678/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2010-03-10 14:23:31.000000000 -0400
@@ -889,7 +889,8 @@
pSize = RRRegisterSize(pScreen,
pvfb->rrScreenSizes[i].width, pvfb->rrScreenSizes[i].height,
- pScreen->mmWidth, pScreen->mmHeight);
+ (pvfb->rrScreenSizes[i].width * 254 + dpi * 5) / (dpi * 10),
+ (pvfb->rrScreenSizes[i].height * 254 + dpi * 5) / (dpi * 10));
if (!pSize)
return FALSE;
RRRegisterRate(pScreen, pSize, 60);
@@ -1046,8 +1047,13 @@
static Bool vncRandRSetConfig (ScreenPtr pScreen, Rotation rotation,
int rate, RRScreenSizePtr pSize)
{
+ int dpi = monitorResolution ? monitorResolution : 100;
+
pScreen->width = pSize->width;
pScreen->height = pSize->height;
+ pScreen->mmWidth = (pScreen->width * 254 + dpi * 5) / (dpi * 10);
+ pScreen->mmHeight = (pScreen->height * 254 + dpi * 5) / (dpi * 10);
+
xf86SetRootClip(pScreen, TRUE);
vncHooksResizeScreen(pScreen);
return TRUE;