summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3e1a541)
- Unconditionally enter NtUser implementation in EngCreateWnd and EngDeleteWnd
CORE-7727
EWNDOBJ *Clip = NULL;
WNDOBJ *WndObjUser = NULL;
PWND Window;
EWNDOBJ *Clip = NULL;
WNDOBJ *WndObjUser = NULL;
PWND Window;
- BOOL calledFromUser;
- DECLARE_RETURN(WNDOBJ*);
TRACE("EngCreateWnd: pso = 0x%p, hwnd = 0x%p, pfn = 0x%p, fl = 0x%lx, pixfmt = %d\n",
pso, hWnd, pfn, fl, iPixelFormat);
TRACE("EngCreateWnd: pso = 0x%p, hwnd = 0x%p, pfn = 0x%p, fl = 0x%lx, pixfmt = %d\n",
pso, hWnd, pfn, fl, iPixelFormat);
+ UserEnterExclusive();
+
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));
}
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();
- }
-
/* Get window object */
Window = UserGetWindowObject(hWnd);
if (Window == NULL)
{
/* Get window object */
Window = UserGetWindowObject(hWnd);
if (Window == NULL)
{
- Clip = EngAllocMem(FL_ZERO_MEMORY, sizeof (EWNDOBJ), GDITAG_WNDOBJ);
+ Clip = EngAllocMem(FL_ZERO_MEMORY, sizeof(EWNDOBJ), GDITAG_WNDOBJ);
if (Clip == NULL)
{
ERR("Failed to allocate memory for a WND structure!\n");
if (Clip == NULL)
{
ERR("Failed to allocate memory for a WND structure!\n");
}
IntEngInitClipObj((XCLIPOBJ*)Clip);
}
IntEngInitClipObj((XCLIPOBJ*)Clip);
if (!IntEngWndUpdateClipObj(Clip, Window))
{
EngFreeMem(Clip);
if (!IntEngWndUpdateClipObj(Clip, Window))
{
EngFreeMem(Clip);
TRACE("EngCreateWnd: SUCCESS: %p!\n", WndObjUser);
TRACE("EngCreateWnd: SUCCESS: %p!\n", WndObjUser);
- RETURN( WndObjUser);
-
-CLEANUP:
-
- if (!calledFromUser) {
- UserLeave();
- }
-
- END_CLEANUP;
+Exit:
+ UserLeave();
+ return WndObjUser;
{
EWNDOBJ* Clip = (EWNDOBJ *)pwo;//CONTAINING_RECORD(pwo, XCLIPOBJ, WndObj);
PWND Window;
{
EWNDOBJ* Clip = (EWNDOBJ *)pwo;//CONTAINING_RECORD(pwo, XCLIPOBJ, WndObj);
PWND Window;
TRACE("EngDeleteWnd: pwo = 0x%p\n", pwo);
TRACE("EngDeleteWnd: pwo = 0x%p\n", pwo);
- calledFromUser = UserIsEntered();
- if (!calledFromUser) {
- UserEnterExclusive();
- }
/* Get window object */
Window = UserGetWindowObject(Clip->Hwnd);
/* Get window object */
Window = UserGetWindowObject(Clip->Hwnd);
- if (!calledFromUser) {
- UserLeave();
- }
/* Free resources */
IntEngFreeClipResources((XCLIPOBJ*)Clip);
/* Free resources */
IntEngFreeClipResources((XCLIPOBJ*)Clip);