Author: tkreuzer
Date: Sun Jan 3 18:10:31 2016
New Revision: 70485
URL:
http://svn.reactos.org/svn/reactos?rev=70485&view=rev
Log:
[WIN32K]
Disable broken code to update a device palette. Should fix testbot crashes.
Modified:
trunk/reactos/win32ss/gdi/ntgdi/palette.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/palette.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/palette.…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/palette.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/palette.c [iso-8859-1] Sun Jan 3 18:10:31 2016
@@ -786,9 +786,6 @@
{
PPALETTE palPtr;
UINT pal_entries;
- HDC hDC;
- PDC dc;
- PWND Wnd;
const PALETTEENTRY *pptr = PaletteColors;
palPtr = PALETTE_ShareLockPalette(hPal);
@@ -816,6 +813,16 @@
PALETTE_ShareUnlockPalette(palPtr);
+#if 0
+/* FIXME: This is completely broken! We cannot call UserGetDesktopWindow
+ without first acquiring the USER lock. But the whole process here is
+ screwed anyway. Instead of messing with the desktop DC, we need to
+ check, whether the palette is associated with a PDEV and whether that
+ PDEV supports palette operations. Then we need to call pfnDrvSetPalette.
+ But since IntGdiRealizePalette() is not even implemented for direct DCs,
+ we can as well just do nothing, that will at least not ASSERT!
+ I leave the whole thing here, to scare people away, who want to "fix" it.
*/
+
/* Immediately apply the new palette if current window uses it */
Wnd = UserGetDesktopWindow();
hDC = UserGetWindowDC(Wnd);
@@ -831,6 +838,7 @@
DC_UnlockDc(dc);
}
UserReleaseDC(Wnd,hDC, FALSE);
+#endif // 0
}
return ret;
}