From 78cc1a5768ce7636f599fc168654f54cc3361648 Mon Sep 17 00:00:00 2001 From: Alexander Gottwald Date: Thu, 18 Mar 2004 15:46:03 +0000 Subject: [PATCH] Fix for the Root Window 100% CPU bug use lParam in winRedrawAllProcShadowGDI as indicator which window initiated the call since EnumerateThreadWindows is called from WM_PAINT handler too and invalidates the fresh painted window right after painting it. --- hw/xwin/winshadgdi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c index 195110bd0..d6fa89474 100644 --- a/hw/xwin/winshadgdi.c +++ b/hw/xwin/winshadgdi.c @@ -228,6 +228,8 @@ winQueryRGBBitsAndMasks (ScreenPtr pScreen) BOOL CALLBACK winRedrawAllProcShadowGDI (HWND hwnd, LPARAM lParam) { + if (hwnd == (HWND)lParam) + return TRUE; InvalidateRect (hwnd, NULL, FALSE); UpdateWindow (hwnd); return TRUE; @@ -839,7 +841,8 @@ winBltExposedRegionsShadowGDI (ScreenPtr pScreen) #ifdef XWIN_MULTIWINDOW /* Redraw all windows */ if (pScreenInfo->fMultiWindow) - EnumThreadWindows(g_dwCurrentThreadID, winRedrawAllProcShadowGDI, 0); + EnumThreadWindows(g_dwCurrentThreadID, winRedrawAllProcShadowGDI, + (LPARAM)pScreenPriv->hwndScreen); #endif return TRUE;