From 66c9184807997d2a0a155ba1697906c07396863f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 21 Jun 2001 00:58:51 +0000 Subject: [PATCH] Fix screen physical size in RandR code for kdrive fbdev and pcmcia servers --- hw/kdrive/fbdev/fbdev.c | 10 +++++++++- hw/kdrive/pcmcia/pcmcia.c | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index b31b7ebaa..320fe48a8 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c,v 1.20 2001/06/13 19:18:44 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c,v 1.21 2001/06/16 05:53:05 keithp Exp $ */ #include "fbdev.h" @@ -322,6 +322,8 @@ fbdevLayerCreate (ScreenPtr pScreen) case 0: pScreen->width = screen->width; pScreen->height = screen->height; + pScreen->mmWidth = screen->width_mm; + pScreen->mmHeight = screen->height_mm; scrpriv->shadow = FALSE; m.matrix[0][0] = 1; m.matrix[0][1] = 0; m.matrix[0][2] = 0; m.matrix[1][0] = 0; m.matrix[1][1] = 1; m.matrix[1][2] = 0; @@ -329,6 +331,8 @@ fbdevLayerCreate (ScreenPtr pScreen) case 90: pScreen->width = screen->height; pScreen->height = screen->width; + pScreen->mmWidth = screen->height_mm; + pScreen->mmHeight = screen->width_mm; scrpriv->shadow = TRUE; m.matrix[0][0] = 0; m.matrix[0][1] = -1; m.matrix[0][2] = screen->height - 1; m.matrix[1][0] = 1; m.matrix[1][1] = 0; m.matrix[1][2] = 0; @@ -336,6 +340,8 @@ fbdevLayerCreate (ScreenPtr pScreen) case 180: pScreen->width = screen->width; pScreen->height = screen->height; + pScreen->mmWidth = screen->width_mm; + pScreen->mmHeight = screen->height_mm; scrpriv->shadow = TRUE; m.matrix[0][0] = -1; m.matrix[0][1] = 0; m.matrix[0][2] = screen->width - 1; m.matrix[1][0] = 0; m.matrix[1][1] = -1; m.matrix[1][2] = screen->height - 1; @@ -343,6 +349,8 @@ fbdevLayerCreate (ScreenPtr pScreen) case 270: pScreen->width = screen->height; pScreen->height = screen->width; + pScreen->mmWidth = screen->height_mm; + pScreen->mmHeight = screen->width_mm; scrpriv->shadow = TRUE; m.matrix[0][0] = 0; m.matrix[0][1] = 1; m.matrix[0][2] = 0; m.matrix[1][0] = -1; m.matrix[1][1] = 0; m.matrix[1][2] = screen->width - 1; diff --git a/hw/kdrive/pcmcia/pcmcia.c b/hw/kdrive/pcmcia/pcmcia.c index 784e5762a..6ed2c3f0e 100644 --- a/hw/kdrive/pcmcia/pcmcia.c +++ b/hw/kdrive/pcmcia/pcmcia.c @@ -27,7 +27,7 @@ * * Tested running under a Compaq IPAQ Pocket PC running Linux */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.c,v 1.2 2001/06/05 16:57:44 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.c,v 1.3 2001/06/20 21:53:31 alanh Exp $ */ #include "pcmcia.h" #define extern @@ -273,24 +273,32 @@ pcmciaLayerCreate (ScreenPtr pScreen) case 0: pScreen->width = screen->width; pScreen->height = screen->height; + pScreen->mmWidth = screen->width_mm; + pScreen->mmHeight = screen->height_mm; m.matrix[0][0] = 1; m.matrix[0][1] = 0; m.matrix[0][2] = 0; m.matrix[1][0] = 0; m.matrix[1][1] = 1; m.matrix[1][2] = 0; break; case 90: pScreen->width = screen->height; pScreen->height = screen->width; + pScreen->mmWidth = screen->height_mm; + pScreen->mmHeight = screen->width_mm; m.matrix[0][0] = 0; m.matrix[0][1] = -1; m.matrix[0][2] = screen->height - 1; m.matrix[1][0] = 1; m.matrix[1][1] = 0; m.matrix[1][2] = 0; break; case 180: pScreen->width = screen->width; pScreen->height = screen->height; + pScreen->mmWidth = screen->width_mm; + pScreen->mmHeight = screen->height_mm; m.matrix[0][0] = -1; m.matrix[0][1] = 0; m.matrix[0][2] = screen->width - 1; m.matrix[1][0] = 0; m.matrix[1][1] = -1; m.matrix[1][2] = screen->height - 1; break; case 270: pScreen->width = screen->height; pScreen->height = screen->width; + pScreen->mmWidth = screen->height_mm; + pScreen->mmHeight = screen->width_mm; m.matrix[0][0] = 0; m.matrix[0][1] = 1; m.matrix[0][2] = 0; m.matrix[1][0] = -1; m.matrix[1][1] = 0; m.matrix[1][2] = screen->width - 1; break;