Adjust the width of the rootless backbuffer to match 32 bit alignment

Make multiplemonitors default for -internalwm
This commit is contained in:
Alexander Gottwald 2004-12-02 14:19:01 +00:00
parent 3b3e24dc4d
commit 2782b88711
3 changed files with 29 additions and 4 deletions

View File

@ -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:

View File

@ -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;
}

View File

@ -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,