Package: xserver-xorg
Version: 6.8.2.dfsg.1-7
Severity: important
Tags: patch

The framebuffer driver does not set the display width properly if used
without Shadow, but keeps the old value from the probed built-in mode.
If the horizontal resolution of the later selected video mode differs,
this is a problem. The patch below fixes this.

Peter Teichmann


diff -urd xc.orig/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c 
xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c
--- xc.orig/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c   2005-10-25 
23:02:32.000000000 +0200
+++ xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c        2005-10-25 
22:55:14.000000000 +0200
@@ -672,11 +672,19 @@
 
        if(fPtr->rotate==FBDEV_ROTATE_CW || fPtr->rotate==FBDEV_ROTATE_CCW)
        {
-         height = pScrn->virtualX;
-         width = pScrn->displayWidth = pScrn->virtualY;
+               height = pScrn->virtualX;
+               width = pScrn->displayWidth = pScrn->virtualY;
        } else {
-         height = pScrn->virtualY;
-         width = pScrn->virtualX;
+               height = pScrn->virtualY;
+               width = pScrn->virtualX;
+       }
+       if (!fPtr->shadowFB)
+       {
+               int fbbpp;
+               /* FIXME: this doesn't work for all cases, e.g. when each 
scanline
+                       has a padding which is independent from the depth 
(controlfb) */
+               fbdevHWGetDepth(pScrn,&fbbpp);
+               pScrn->displayWidth = fbdevHWGetLineLength(pScrn)/(fbbpp >> 3);
        }
 
        if(fPtr->rotate && !fPtr->PointerMoved) {


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to