From 73e58adda96c1d1b5176d819107faa7697c3eb94 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Wed, 16 Aug 2006 18:17:58 +0200 Subject: [PATCH 1/4] Fixed segfault w/ broken Xinerama configs. --- hw/xfree86/common/xf86Cursor.c | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index 14e0fcd91..61f0ce55e 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -576,24 +576,40 @@ xf86InitOrigins(void) /* force edge lists */ if(screen->left) { ref = screen->left->screennum; + if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) { + ErrorF("Referenced uninitialized screen in Layout!\n"); + break; + } pLayout->left = AddEdge(pLayout->left, 0, xf86Screens[i]->pScreen->height, xf86Screens[ref]->pScreen->width, 0, ref); } if(screen->right) { ref = screen->right->screennum; + if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) { + ErrorF("Referenced uninitialized screen in Layout!\n"); + break; + } pScreen = xf86Screens[i]->pScreen; pLayout->right = AddEdge(pLayout->right, 0, pScreen->height, -pScreen->width, 0, ref); } if(screen->top) { ref = screen->top->screennum; + if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) { + ErrorF("Referenced uninitialized screen in Layout!\n"); + break; + } pLayout->up = AddEdge(pLayout->up, 0, xf86Screens[i]->pScreen->width, 0, xf86Screens[ref]->pScreen->height, ref); } if(screen->bottom) { ref = screen->bottom->screennum; + if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) { + ErrorF("Referenced uninitialized screen in Layout!\n"); + break; + } pScreen = xf86Screens[i]->pScreen; pLayout->down = AddEdge(pLayout->down, 0, pScreen->width, 0, -pScreen->height, ref); @@ -609,6 +625,10 @@ xf86InitOrigins(void) break; case PosRelative: ref = screen->refscreen->screennum; + if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) { + ErrorF("Referenced uninitialized screen in Layout!\n"); + break; + } if(screensLeft & (1 << ref)) break; dixScreenOrigins[i].x = dixScreenOrigins[ref].x + screen->x; dixScreenOrigins[i].y = dixScreenOrigins[ref].y + screen->y; @@ -616,6 +636,10 @@ xf86InitOrigins(void) break; case PosRightOf: ref = screen->refscreen->screennum; + if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) { + ErrorF("Referenced uninitialized screen in Layout!\n"); + break; + } if(screensLeft & (1 << ref)) break; pScreen = xf86Screens[ref]->pScreen; dixScreenOrigins[i].x = @@ -625,6 +649,10 @@ xf86InitOrigins(void) break; case PosLeftOf: ref = screen->refscreen->screennum; + if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) { + ErrorF("Referenced uninitialized screen in Layout!\n"); + break; + } if(screensLeft & (1 << ref)) break; pScreen = xf86Screens[i]->pScreen; dixScreenOrigins[i].x = @@ -634,6 +662,10 @@ xf86InitOrigins(void) break; case PosBelow: ref = screen->refscreen->screennum; + if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) { + ErrorF("Referenced uninitialized screen in Layout!\n"); + break; + } if(screensLeft & (1 << ref)) break; pScreen = xf86Screens[ref]->pScreen; dixScreenOrigins[i].x = dixScreenOrigins[ref].x; @@ -643,6 +675,10 @@ xf86InitOrigins(void) break; case PosAbove: ref = screen->refscreen->screennum; + if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) { + ErrorF("Referenced uninitialized screen in Layout!\n"); + break; + } if(screensLeft & (1 << ref)) break; pScreen = xf86Screens[i]->pScreen; dixScreenOrigins[i].x = dixScreenOrigins[ref].x; From ce4a0a4ddafd3833d7025f83ed3729915c8aba70 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Thu, 24 Aug 2006 13:56:22 +0100 Subject: [PATCH 2/4] Apply patch in bug #7919, blit improvements in multiwindow mode for Xming/CygwinX --- hw/xwin/winmultiwindowwndproc.c | 20 +++++++++----------- hw/xwin/winshadgdi.c | 7 ++++--- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index e35974468..0df896dd3 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -304,7 +304,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message, winScreenInfo *s_pScreenInfo = NULL; HWND hwndScreen = NULL; DrawablePtr pDraw = NULL; - int iX, iY, iWidth, iHeight, iBorder; winWMMessageRec wmMsg; Bool fWMMsgInitialized = FALSE; static Bool s_fTracking = FALSE; @@ -442,20 +441,19 @@ winTopLevelWindowProc (HWND hwnd, UINT message, /* BeginPaint gives us an hdc that clips to the invalidated region */ hdcUpdate = BeginPaint (hwnd, &ps); - - /* Get the position and dimensions of the window */ - iBorder = wBorderWidth (pWin); - iX = pWin->drawable.x; - iY = pWin->drawable.y; - iWidth = pWin->drawable.width; - iHeight = pWin->drawable.height; + /* Avoid the BitBlt's if the PAINTSTRUCT is bogus */ + if (ps.rcPaint.right==0 && ps.rcPaint.bottom==0 && ps.rcPaint.left==0 && ps.rcPaint.top==0) + { + EndPaint (hwndScreen, &ps); + return 0; + } /* Try to copy from the shadow buffer */ if (!BitBlt (hdcUpdate, - 0, 0, - iWidth, iHeight, + ps.rcPaint.left, ps.rcPaint.top, + ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top, s_pScreenPriv->hdcShadow, - iX, iY, + ps.rcPaint.left + pWin->drawable.x, ps.rcPaint.top + pWin->drawable.y, SRCCOPY)) { LPVOID lpMsgBuf; diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c index ba9819298..04cc2f716 100644 --- a/hw/xwin/winshadgdi.c +++ b/hw/xwin/winshadgdi.c @@ -540,8 +540,9 @@ winShadowUpdateGDI (ScreenPtr pScreen, * handle large regions by creating a clipping region and * doing a single blit constrained to that clipping region. */ - if (pScreenInfo->dwClipUpdatesNBoxes == 0 - || dwBox < pScreenInfo->dwClipUpdatesNBoxes) + if (!pScreenInfo->fMultiWindow && + (pScreenInfo->dwClipUpdatesNBoxes == 0 || + dwBox < pScreenInfo->dwClipUpdatesNBoxes)) { /* Loop through all boxes in the damaged region */ while (dwBox--) @@ -566,7 +567,7 @@ winShadowUpdateGDI (ScreenPtr pScreen, ++pBox; } } - else + else if (!pScreenInfo->fMultiWindow) { /* Compute a GDI region from the damaged region */ hrgnCombined = CreateRectRgn (pBox->x1, pBox->y1, pBox->x2, pBox->y2); From b29b236d88789fd45d823a55dbedb393bb134c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Turek?= <8an@centrum.cz> Date: Thu, 24 Aug 2006 15:57:09 +0200 Subject: [PATCH 3/4] Adapt to Mesa header name change. --- GL/symlink-mesa.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GL/symlink-mesa.sh b/GL/symlink-mesa.sh index 32f839ac5..7b5ed5c3d 100755 --- a/GL/symlink-mesa.sh +++ b/GL/symlink-mesa.sh @@ -468,7 +468,7 @@ symlink_mesa_shader_slang_library() { action slang_core_gc.h action slang_fragment_builtin_gc.h action slang_shader_syn.h - action slang_version_syn.h + action slang_pp_version_syn.h action slang_vertex_builtin_gc.h } From b879356ce96929d02bcb75b9aa24b17ac7e28125 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 24 Aug 2006 15:50:15 -0400 Subject: [PATCH 4/4] More #ifdef USE_DEPRECATED_KEYBOARD_DRIVER. --- hw/xfree86/common/xf86Init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index cd072f575..408536d11 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -135,7 +135,8 @@ static int numFormats = 6; #endif static Bool formatsDone = FALSE; -InputDriverRec XF86KEYBOARD = { +#ifdef USE_DEPRECATED_KEYBOARD_DRIVER +static InputDriverRec XF86KEYBOARD = { 1, "keyboard", NULL, @@ -144,6 +145,7 @@ InputDriverRec XF86KEYBOARD = { NULL, 0 }; +#endif static Bool xf86CreateRootWindow(WindowPtr pWin)