diff options
-rw-r--r-- | hw/xwin/ChangeLog | 8 | ||||
-rwxr-xr-x | hw/xwin/winprocarg.c | 4 | ||||
-rwxr-xr-x | hw/xwin/winwin32rootless.c | 21 |
3 files changed, 29 insertions, 4 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog index 8d7ad1a50..b2a97dd5c 100644 --- a/hw/xwin/ChangeLog +++ b/hw/xwin/ChangeLog @@ -1,3 +1,11 @@ +2004-12-02 Alexander Gottwald <ago at freedesktop dot org> + + * winwin32rootless.c: + Adjust the width of the rootless backbuffer to match 32 bit alignment + + * winprocarg.c: + Make multiplemonitors default for -internalwm + 2004-12-01 Alexander Gottwald <ago at freedesktop dot org> * InitOutput.c: diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c index 11dcc525e..e883caffe 100755 --- a/hw/xwin/winprocarg.c +++ b/hw/xwin/winprocarg.c @@ -530,6 +530,8 @@ ddxProcessArgument (int argc, char *argv[], int i) /* Parameter is for all screens */ for (j = 0; j < MAXSCREENS; j++) { + if (!g_ScreenInfo[j].fMultiMonitorOverride) + g_ScreenInfo[j].fMultipleMonitors = TRUE; g_ScreenInfo[j].fMWExtWM = TRUE; g_ScreenInfo[j].fInternalWM = TRUE; } @@ -537,6 +539,8 @@ ddxProcessArgument (int argc, char *argv[], int i) else { /* Parameter is for a single screen */ + if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) + g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE; g_ScreenInfo[g_iLastScreen].fMWExtWM = TRUE; g_ScreenInfo[g_iLastScreen].fInternalWM = TRUE; } diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c index 8c4c617c6..e654b5c24 100755 --- a/hw/xwin/winwin32rootless.c +++ b/hw/xwin/winwin32rootless.c @@ -717,11 +717,24 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow) if (pRLWinPriv->fResized) { - hdcNew = CreateCompatibleDC (pRLWinPriv->hdcScreen); - /* Describe shadow bitmap to be created */ - pRLWinPriv->pbmihShadow->biWidth = pRLWinPriv->pFrame->width;//pRLWinPriv->dwWidth; - pRLWinPriv->pbmihShadow->biHeight = -pRLWinPriv->pFrame->height;//pRLWinPriv->dwHeight; + /* width * bpp must be multiple of 4 to match 32bit alignment */ + int stridesize; + int misalignment; + + pRLWinPriv->pbmihShadow->biWidth = pRLWinPriv->pFrame->width; + pRLWinPriv->pbmihShadow->biHeight = -pRLWinPriv->pFrame->height; + + stridesize = pRLWinPriv->pFrame->width * (pScreenInfo->dwBPP >> 3); + misalignment = stridesize & 3; + if (misalignment != 0) + { + stridesize += 4 - misalignment; + pRLWinPriv->pbmihShadow->biWidth = stridesize / (pScreenInfo->dwBPP >> 3); + winDebug("\tresizing to %d (was %d)\n", + pRLWinPriv->pbmihShadow->biWidth, pRLWinPriv->pFrame->width); + } + hdcNew = CreateCompatibleDC (pRLWinPriv->hdcScreen); /* Create a DI shadow bitmap with a bit pointer */ hbmpNew = CreateDIBSection (pRLWinPriv->hdcScreen, (BITMAPINFO *) pRLWinPriv->pbmihShadow, |