Author: jgardou
Date: Mon Jul 28 13:03:25 2014
New Revision: 63749
URL:
http://svn.reactos.org/svn/reactos?rev=63749&view=rev
Log:
[WIN32K]
- Properly send WOC_RGN_CLIENT to the GDI driver when window client region changes
- Increment CLIPOBJ::iUniq so that drivers know that something changed
- Some improvements in win32k side of opengl pixel format selection
- Hack around atom collision between the kernel atom table and the win32k one
Now vmware ICD does something decent, even if you can use it only once per ReactOS session
(!)
Modified:
trunk/reactos/win32ss/gdi/eng/engwindow.c
trunk/reactos/win32ss/gdi/ntgdi/dclife.c
trunk/reactos/win32ss/gdi/ntgdi/wingl.c
trunk/reactos/win32ss/user/ntuser/ntuser.c
trunk/reactos/win32ss/user/ntuser/windc.c
Modified: trunk/reactos/win32ss/gdi/eng/engwindow.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engwindow.…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/engwindow.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/engwindow.c [iso-8859-1] Mon Jul 28 13:03:25 2014
@@ -96,6 +96,7 @@
/* Update the WNDOBJ */
Clip->WndObj.rclClient = Window->rcClient;
+ Clip->WndObj.coClient.iUniq++;
return TRUE;
}
@@ -111,12 +112,6 @@
{
XCLIPOBJ *Clip;
- /*
- * This function is broken because AtomWndObj conflicts with
- * properties set from user mode using SetPropW
- */
- return;
-
ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);
Clip = UserGetProp(Window, AtomWndObj);
@@ -126,7 +121,7 @@
}
ASSERT(Clip->Hwnd == Window->head.h);
- if (Clip->WndObj.pvConsumer != NULL)
+ // if (Clip->WndObj.pvConsumer != NULL)
{
/* Update the WNDOBJ */
switch (flChanged)
@@ -173,6 +168,11 @@
TRACE("EngCreateWnd: pso = 0x%p, hwnd = 0x%p, pfn = 0x%p, fl = 0x%lx, pixfmt =
%d\n",
pso, hWnd, pfn, fl, iPixelFormat);
+ if (fl & (WO_RGN_WINDOW | WO_RGN_DESKTOP_COORD | WO_RGN_UPDATE_ALL))
+ {
+ FIXME("Unsupported flags: 0x%lx\n", fl & ~(WO_RGN_CLIENT_DELTA |
WO_RGN_CLIENT | WO_RGN_SURFACE_DELTA | WO_RGN_SURFACE));
+ }
+
calledFromUser = UserIsEntered();
if (!calledFromUser) {
UserEnterShared();
@@ -209,7 +209,12 @@
/* Fill internal object */
Clip->Hwnd = hWnd;
Clip->ChangeProc = pfn;
- Clip->Flags = fl;
+ /* Keep track of relevant flags */
+ Clip->Flags = fl & (WO_RGN_CLIENT_DELTA | WO_RGN_CLIENT | WO_RGN_SURFACE_DELTA
| WO_RGN_SURFACE | WO_DRAW_NOTIFY);
+ if (fl & WO_SPRITE_NOTIFY)
+ Clip->Flags |= WOC_SPRITE_OVERLAP | WOC_SPRITE_NO_OVERLAP;
+ /* Those should always be sent */
+ Clip->Flags |= WOC_CHANGED | WOC_DELETE;
Clip->PixelFormat = iPixelFormat;
/* associate object with window */
@@ -259,8 +264,8 @@
{
/* Remove object from window */
IntRemoveProp(Window, AtomWndObj);
- --gcountPWO;
- }
+ }
+ --gcountPWO;
if (!calledFromUser) {
UserLeave();
Modified: trunk/reactos/win32ss/gdi/ntgdi/dclife.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dclife.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/dclife.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/dclife.c [iso-8859-1] Mon Jul 28 13:03:25 2014
@@ -318,7 +318,7 @@
/* Other stuff */
pdc->hdcNext = NULL;
pdc->hdcPrev = NULL;
- pdc->ipfdDevMax = 0x0000ffff;
+ pdc->ipfdDevMax = 0;
pdc->ulCopyCount = -1;
pdc->ptlDoBanding.x = 0;
pdc->ptlDoBanding.y = 0;
Modified: trunk/reactos/win32ss/gdi/ntgdi/wingl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/wingl.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/wingl.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/wingl.c [iso-8859-1] Mon Jul 28 13:03:25 2014
@@ -62,7 +62,19 @@
}
if (!pdc->ipfdDevMax)
- IntGetipfdDevMax(pdc);
+ {
+ if (!IntGetipfdDevMax(pdc))
+ {
+ /* EngSetLastError ? */
+ goto Exit;
+ }
+ }
+
+ if (!ppfd)
+ {
+ Ret = pdc->ipfdDevMax;
+ goto Exit;
+ }
if ((ipfd < 1) || (ipfd > pdc->ipfdDevMax))
{
Modified: trunk/reactos/win32ss/user/ntuser/ntuser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/ntuser…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/ntuser.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/ntuser.c [iso-8859-1] Mon Jul 28 13:03:25 2014
@@ -49,7 +49,12 @@
gpsi->atomFrostedWindowProp = IntAddGlobalAtom(L"SysFrostedWindow",
TRUE);
- AtomWndObj = IntAddGlobalAtom(L"SysWNDO", TRUE);
+ /*
+ * FIXME: AddPropW uses the global kernel atom table, thus leading to conflicts if we
use
+ * the win32k atom table for this ones. What is the right thing to do ?
+ */
+ // AtomWndObj = IntAddGlobalAtom(L"SysWNDO", TRUE);
+ NtAddAtom(L"SysWNDO", 14, &AtomWndObj);
AtomLayer = IntAddGlobalAtom(L"SysLayer", TRUE);
AtomFlashWndState = IntAddGlobalAtom(L"FlashWState", TRUE);
Modified: trunk/reactos/win32ss/user/ntuser/windc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/windc.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/windc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/windc.c [iso-8859-1] Mon Jul 28 13:03:25 2014
@@ -276,11 +276,9 @@
Dce->DCXFlags &= ~DCX_DCEDIRTY;
GdiSelectVisRgn(Dce->hDC, RgnVisible);
-
- if (VerifyWnd(Window)) // Window maybe dead by this time before finishing the DCE
release.
- {
- IntEngWindowChanged(Window, WOC_RGN_CLIENT);
- }
+ /* Tell GDI driver */
+ if (Window)
+ IntEngWindowChanged(Window, WOC_RGN_CLIENT);
if (RgnVisible != NULL)
{
@@ -935,12 +933,6 @@
DceUpdateVisRgn(pDCE, CurrentWindow, pDCE->DCXFlags);
IntGdiSetHookFlags(pDCE->hDC, DCHF_VALIDATEVISRGN);
-
- if (Window->head.h != pDCE->hwndCurrent)
- {
-// IntEngWindowChanged(CurrentWindow, WOC_RGN_CLIENT);
-// UserDerefObject(CurrentWindow);
- }
}
pLE = pDCE->List.Flink;
pDCE = CONTAINING_RECORD(pLE, DCE, List);