summaryrefslogtreecommitdiff
path: root/hw/xwin/winscrinit.c
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2010-08-31 10:13:01 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2011-01-19 14:02:34 +0000
commit3f7339a7c5d3dcd05909b041865125f4cb6fa29e (patch)
treed01767418088326b99772fad53f1585d356b8c2a /hw/xwin/winscrinit.c
parent8b22f83113fbdc09b932b5ad7e44f629fc15e3b5 (diff)
Cygwin/X: Deal with RANDR depth changes correctly in ShadowGDI drawing engine
Make ShadowGDI drawing engine only change the size of the screen pixmap/shadow framebuffer on an RANDR change, not the bpp/depth as well. The server requires the screen pixmap's depth to be invariant. Other drawing engines aren't quite as affected by this issue as they won't draw to the display, if it has changed colour depth, but probably still need some attention. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw/xwin/winscrinit.c')
-rw-r--r--hw/xwin/winscrinit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index f505dddca..699ed949e 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -126,7 +126,7 @@ winScreenInit (int index,
return FALSE;
}
- /* Adjust the video mode for our engine type */
+ /* Horribly misnamed function: Allow engine to adjust BPP for screen */
if (!(*pScreenPriv->pwinAdjustVideoMode) (pScreen))
{
ErrorF ("winScreenInit - winAdjustVideoMode () failed\n");
@@ -269,7 +269,8 @@ winFinishScreenInitFB (int index,
}
/*
- * Grab the number of bits that are used to represent color in each pixel.
+ * Calculate the number of bits that are used to represent color in each pixel,
+ * the color depth for the screen
*/
if (pScreenInfo->dwBPP == 8)
pScreenInfo->dwDepth = 8;
@@ -277,7 +278,7 @@ winFinishScreenInitFB (int index,
pScreenInfo->dwDepth = winCountBits (pScreenPriv->dwRedMask)
+ winCountBits (pScreenPriv->dwGreenMask)
+ winCountBits (pScreenPriv->dwBlueMask);
-
+
winErrorFVerb (2, "winFinishScreenInitFB - Masks: %08x %08x %08x\n",
(unsigned int) pScreenPriv->dwRedMask,
(unsigned int) pScreenPriv->dwGreenMask,