mirror of
https://github.com/reactos/reactos.git
synced 2024-07-21 19:58:08 +00:00
[Win32k]
- Continuing the moving into WND structure with minor desktop structure changes. - Tested: wine user32 tests, AbiWord 2.6.8, FF 3.5, OOo 2.4.3 and Seamonkey 2.0. svn path=/trunk/; revision=44576
This commit is contained in:
parent
d51b4d5202
commit
f755214f06
|
@ -27,7 +27,7 @@ typedef struct _DESKTOP
|
||||||
|
|
||||||
PWIN32HEAP pheapDesktop;
|
PWIN32HEAP pheapDesktop;
|
||||||
PSECTION_OBJECT DesktopHeapSection;
|
PSECTION_OBJECT DesktopHeapSection;
|
||||||
PDESKTOPINFO DesktopInfo;
|
PDESKTOPINFO pDeskInfo;
|
||||||
PWND spwndMessage;
|
PWND spwndMessage;
|
||||||
} DESKTOP, *PDESKTOP;
|
} DESKTOP, *PDESKTOP;
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ typedef struct _WINDOW_OBJECT
|
||||||
|
|
||||||
/* Pointer to the thread information */
|
/* Pointer to the thread information */
|
||||||
PTHREADINFO pti; // Use Wnd->head.pti
|
PTHREADINFO pti; // Use Wnd->head.pti
|
||||||
/* Pointer to the desktop */
|
|
||||||
PDESKTOPINFO Desktop;
|
|
||||||
/* system menu handle. */
|
/* system menu handle. */
|
||||||
HMENU SystemMenu;
|
HMENU SystemMenu;
|
||||||
/* Entry in the thread's list of windows. */
|
/* Entry in the thread's list of windows. */
|
||||||
|
@ -36,7 +34,7 @@ typedef struct _WINDOW_OBJECT
|
||||||
/* Handle for the window. */
|
/* Handle for the window. */
|
||||||
HWND hSelf;
|
HWND hSelf;
|
||||||
/* Window flags. */
|
/* Window flags. */
|
||||||
ULONG Flags;
|
ULONG state;
|
||||||
/* Handle of region of the window to be updated. */
|
/* Handle of region of the window to be updated. */
|
||||||
HANDLE UpdateRegion;
|
HANDLE UpdateRegion;
|
||||||
/* Handle of the window region. */
|
/* Handle of the window region. */
|
||||||
|
@ -59,7 +57,6 @@ typedef struct _WINDOW_OBJECT
|
||||||
PWINDOW_SCROLLINFO Scroll;
|
PWINDOW_SCROLLINFO Scroll;
|
||||||
PETHREAD OwnerThread; // Use Wnd->head.pti
|
PETHREAD OwnerThread; // Use Wnd->head.pti
|
||||||
HWND hWndLastPopup; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
|
HWND hWndLastPopup; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
|
||||||
ULONG Status;
|
|
||||||
/* counter for tiled child windows */
|
/* counter for tiled child windows */
|
||||||
ULONG TiledCounter;
|
ULONG TiledCounter;
|
||||||
/* WNDOBJ list */
|
/* WNDOBJ list */
|
||||||
|
@ -67,14 +64,14 @@ typedef struct _WINDOW_OBJECT
|
||||||
} WINDOW_OBJECT; /* PWINDOW_OBJECT already declared at top of file */
|
} WINDOW_OBJECT; /* PWINDOW_OBJECT already declared at top of file */
|
||||||
|
|
||||||
/* Window flags. */
|
/* Window flags. */
|
||||||
#define WINDOWOBJECT_NEED_SIZE (0x00000001) // WNDS_SENDSIZEMOVEMSGS?
|
#define WINDOWOBJECT_NEED_SIZE WNDS_SENDSIZEMOVEMSGS
|
||||||
#define WINDOWOBJECT_NEED_ERASEBKGND (0x00000002) // WNDS_ERASEBACKGROUND
|
#define WINDOWOBJECT_NEED_ERASEBKGND WNDS_ERASEBACKGROUND
|
||||||
#define WINDOWOBJECT_NEED_NCPAINT (0x00000004) // WNDS_SENDNCPAINT
|
#define WINDOWOBJECT_NEED_NCPAINT WNDS_SENDNCPAINT
|
||||||
#define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000008) // WNDS_INTERNALPAINT
|
#define WINDOWOBJECT_NEED_INTERNALPAINT WNDS_INTERNALPAINT
|
||||||
#define WINDOWOBJECT_RESTOREMAX (0x00000020) // Set/Clr WS_MAXIMIZE && Clr/Set WS_EX2_VERTICALLYMAXIMIZEDLEFT/RIGHT
|
#define WINDOWOBJECT_RESTOREMAX (0x00000020) // Set/Clr WS_MAXIMIZE && Clr/Set WS_EX2_VERTICALLYMAXIMIZEDLEFT/RIGHT
|
||||||
|
|
||||||
#define WINDOWSTATUS_DESTROYING (0x1) // WNDS2_INDESTROY
|
#define WINDOWSTATUS_DESTROYING WNDS2_INDESTROY
|
||||||
#define WINDOWSTATUS_DESTROYED (0x2) // WNDS_DESTROYED
|
#define WINDOWSTATUS_DESTROYED WNDS_DESTROYED
|
||||||
|
|
||||||
#define HAS_DLGFRAME(Style, ExStyle) \
|
#define HAS_DLGFRAME(Style, ExStyle) \
|
||||||
(((ExStyle) & WS_EX_DLGMODALFRAME) || \
|
(((ExStyle) & WS_EX_DLGMODALFRAME) || \
|
||||||
|
|
|
@ -1032,23 +1032,23 @@ NtUserCreateDesktop(
|
||||||
DesktopInfoSize = FIELD_OFFSET(DESKTOPINFO,
|
DesktopInfoSize = FIELD_OFFSET(DESKTOPINFO,
|
||||||
szDesktopName[(lpszDesktopName->Length / sizeof(WCHAR)) + 1]);
|
szDesktopName[(lpszDesktopName->Length / sizeof(WCHAR)) + 1]);
|
||||||
|
|
||||||
DesktopObject->DesktopInfo = RtlAllocateHeap(DesktopObject->pheapDesktop,
|
DesktopObject->pDeskInfo = RtlAllocateHeap(DesktopObject->pheapDesktop,
|
||||||
HEAP_NO_SERIALIZE,
|
HEAP_NO_SERIALIZE,
|
||||||
DesktopInfoSize);
|
DesktopInfoSize);
|
||||||
|
|
||||||
if (DesktopObject->DesktopInfo == NULL)
|
if (DesktopObject->pDeskInfo == NULL)
|
||||||
{
|
{
|
||||||
ObDereferenceObject(DesktopObject);
|
ObDereferenceObject(DesktopObject);
|
||||||
DPRINT1("Failed to create the DESKTOP structure!\n");
|
DPRINT1("Failed to create the DESKTOP structure!\n");
|
||||||
RETURN(NULL);
|
RETURN(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlZeroMemory(DesktopObject->DesktopInfo,
|
RtlZeroMemory(DesktopObject->pDeskInfo,
|
||||||
DesktopInfoSize);
|
DesktopInfoSize);
|
||||||
|
|
||||||
DesktopObject->DesktopInfo->pvDesktopBase = DesktopHeapSystemBase;
|
DesktopObject->pDeskInfo->pvDesktopBase = DesktopHeapSystemBase;
|
||||||
DesktopObject->DesktopInfo->pvDesktopLimit = (PVOID)((ULONG_PTR)DesktopHeapSystemBase + HeapSize);
|
DesktopObject->pDeskInfo->pvDesktopLimit = (PVOID)((ULONG_PTR)DesktopHeapSystemBase + HeapSize);
|
||||||
RtlCopyMemory(DesktopObject->DesktopInfo->szDesktopName,
|
RtlCopyMemory(DesktopObject->pDeskInfo->szDesktopName,
|
||||||
lpszDesktopName->Buffer,
|
lpszDesktopName->Buffer,
|
||||||
lpszDesktopName->Length);
|
lpszDesktopName->Length);
|
||||||
|
|
||||||
|
@ -1928,7 +1928,7 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
|
||||||
if (GetWin32ClientInfo()->pDeskInfo == NULL)
|
if (GetWin32ClientInfo()->pDeskInfo == NULL)
|
||||||
{
|
{
|
||||||
GetWin32ClientInfo()->pDeskInfo =
|
GetWin32ClientInfo()->pDeskInfo =
|
||||||
(PVOID)((ULONG_PTR)DesktopObject->DesktopInfo -
|
(PVOID)((ULONG_PTR)DesktopObject->pDeskInfo -
|
||||||
GetWin32ClientInfo()->ulClientDelta);
|
GetWin32ClientInfo()->ulClientDelta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1979,7 +1979,7 @@ IntSetThreadDesktop(IN PDESKTOP DesktopObject,
|
||||||
pci->ulClientDelta = DesktopHeapGetUserDelta();
|
pci->ulClientDelta = DesktopHeapGetUserDelta();
|
||||||
if (DesktopObject)
|
if (DesktopObject)
|
||||||
{
|
{
|
||||||
pci->pDeskInfo = (PVOID)((ULONG_PTR)DesktopObject->DesktopInfo - pci->ulClientDelta);
|
pci->pDeskInfo = (PVOID)((ULONG_PTR)DesktopObject->pDeskInfo - pci->ulClientDelta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1462,7 +1462,7 @@ IntKeyboardInput(KEYBDINPUT *ki)
|
||||||
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
||||||
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
|
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
|
||||||
|
|
||||||
FocusMessageQueue->Desktop->DesktopInfo->LastInputWasKbd = TRUE;
|
FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE;
|
||||||
|
|
||||||
IntGetCursorLocation(FocusMessageQueue->Desktop->WindowStation,
|
IntGetCursorLocation(FocusMessageQueue->Desktop->WindowStation,
|
||||||
&Msg.pt);
|
&Msg.pt);
|
||||||
|
|
|
@ -571,7 +571,7 @@ co_IntTranslateMouseMessage(
|
||||||
{
|
{
|
||||||
/* post the message to the other window */
|
/* post the message to the other window */
|
||||||
Msg->hwnd = Wnd->hSelf;
|
Msg->hwnd = Wnd->hSelf;
|
||||||
if(!(Wnd->Status & WINDOWSTATUS_DESTROYING))
|
if(!(Wnd->state & WINDOWSTATUS_DESTROYING))
|
||||||
{
|
{
|
||||||
MsqPostMessage(Wnd->MessageQueue, Msg, FALSE,
|
MsqPostMessage(Wnd->MessageQueue, Msg, FALSE,
|
||||||
Msg->message == WM_MOUSEMOVE ? QS_MOUSEMOVE :
|
Msg->message == WM_MOUSEMOVE ? QS_MOUSEMOVE :
|
||||||
|
@ -1163,7 +1163,7 @@ UserPostMessage( HWND Wnd,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( Window->Status & WINDOWSTATUS_DESTROYING )
|
if ( Window->state & WINDOWSTATUS_DESTROYING )
|
||||||
{
|
{
|
||||||
DPRINT1("Attempted to post message to window 0x%x that is being destroyed!\n", Wnd);
|
DPRINT1("Attempted to post message to window 0x%x that is being destroyed!\n", Wnd);
|
||||||
/* FIXME - last error code? */
|
/* FIXME - last error code? */
|
||||||
|
@ -1290,7 +1290,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd,
|
||||||
RETURN( FALSE);
|
RETURN( FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Window->Status & WINDOWSTATUS_DESTROYING)
|
if (Window->state & WINDOWSTATUS_DESTROYING)
|
||||||
{
|
{
|
||||||
/* FIXME - last error? */
|
/* FIXME - last error? */
|
||||||
DPRINT1("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
|
DPRINT1("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
|
||||||
|
@ -1457,7 +1457,7 @@ co_IntDoSendMessage( HWND hWnd,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for an exiting window. */
|
/* Check for an exiting window. */
|
||||||
if (Window && Window->Status & WINDOWSTATUS_DESTROYING)
|
if (Window && Window->state & WINDOWSTATUS_DESTROYING)
|
||||||
{
|
{
|
||||||
DPRINT1("co_IntDoSendMessage Window Exiting!\n");
|
DPRINT1("co_IntDoSendMessage Window Exiting!\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -471,7 +471,7 @@ GetW32ThreadInfo(VOID)
|
||||||
|
|
||||||
if (pti->Desktop != NULL)
|
if (pti->Desktop != NULL)
|
||||||
{
|
{
|
||||||
pti->pDeskInfo = pti->Desktop->DesktopInfo;
|
pti->pDeskInfo = pti->Desktop->pDeskInfo;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -839,7 +839,7 @@ co_MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
||||||
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
|
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
|
||||||
|
|
||||||
FocusMessageQueue->Desktop->DesktopInfo->LastInputWasKbd = TRUE;
|
FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE;
|
||||||
|
|
||||||
IntGetCursorLocation(FocusMessageQueue->Desktop->WindowStation,
|
IntGetCursorLocation(FocusMessageQueue->Desktop->WindowStation,
|
||||||
&Msg.pt);
|
&Msg.pt);
|
||||||
|
|
|
@ -195,7 +195,7 @@ IntGetNCUpdateRgn(PWINDOW_OBJECT Window, BOOL Validate)
|
||||||
GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess());
|
GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess());
|
||||||
GreDeleteObject(Window->UpdateRegion);
|
GreDeleteObject(Window->UpdateRegion);
|
||||||
Window->UpdateRegion = NULL;
|
Window->UpdateRegion = NULL;
|
||||||
if (!(Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT))
|
if (!(Window->state & WINDOWOBJECT_NEED_INTERNALPAINT))
|
||||||
MsqDecPaintCountQueue(Window->MessageQueue);
|
MsqDecPaintCountQueue(Window->MessageQueue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -237,17 +237,17 @@ co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags, BOOL Recurse)
|
||||||
if (Flags & RDW_UPDATENOW)
|
if (Flags & RDW_UPDATENOW)
|
||||||
{
|
{
|
||||||
if (Window->UpdateRegion != NULL ||
|
if (Window->UpdateRegion != NULL ||
|
||||||
Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT)
|
Window->state & WINDOWOBJECT_NEED_INTERNALPAINT)
|
||||||
{
|
{
|
||||||
co_IntSendMessage(hWnd, WM_PAINT, 0, 0);
|
co_IntSendMessage(hWnd, WM_PAINT, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Window->Flags & WINDOWOBJECT_NEED_NCPAINT)
|
if (Window->state & WINDOWOBJECT_NEED_NCPAINT)
|
||||||
{
|
{
|
||||||
TempRegion = IntGetNCUpdateRgn(Window, TRUE);
|
TempRegion = IntGetNCUpdateRgn(Window, TRUE);
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT;
|
Window->state &= ~WINDOWOBJECT_NEED_NCPAINT;
|
||||||
MsqDecPaintCountQueue(Window->MessageQueue);
|
MsqDecPaintCountQueue(Window->MessageQueue);
|
||||||
co_IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)TempRegion, 0);
|
co_IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)TempRegion, 0);
|
||||||
if ((HANDLE) 1 != TempRegion && NULL != TempRegion)
|
if ((HANDLE) 1 != TempRegion && NULL != TempRegion)
|
||||||
|
@ -257,7 +257,7 @@ co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags, BOOL Recurse)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Window->Flags & WINDOWOBJECT_NEED_ERASEBKGND)
|
if (Window->state & WINDOWOBJECT_NEED_ERASEBKGND)
|
||||||
{
|
{
|
||||||
if (Window->UpdateRegion)
|
if (Window->UpdateRegion)
|
||||||
{
|
{
|
||||||
|
@ -266,7 +266,7 @@ co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags, BOOL Recurse)
|
||||||
DCX_INTERSECTRGN | DCX_KEEPCLIPRGN);
|
DCX_INTERSECTRGN | DCX_KEEPCLIPRGN);
|
||||||
if (co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)hDC, 0))
|
if (co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)hDC, 0))
|
||||||
{
|
{
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBKGND;
|
Window->state &= ~WINDOWOBJECT_NEED_ERASEBKGND;
|
||||||
}
|
}
|
||||||
UserReleaseDC(Window, hDC, FALSE);
|
UserReleaseDC(Window, hDC, FALSE);
|
||||||
}
|
}
|
||||||
|
@ -367,8 +367,8 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
HadPaintMessage = Window->UpdateRegion != NULL ||
|
HadPaintMessage = Window->UpdateRegion != NULL ||
|
||||||
Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT;
|
Window->state & WINDOWOBJECT_NEED_INTERNALPAINT;
|
||||||
HadNCPaintMessage = Window->Flags & WINDOWOBJECT_NEED_NCPAINT;
|
HadNCPaintMessage = Window->state & WINDOWOBJECT_NEED_NCPAINT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update the region and flags
|
* Update the region and flags
|
||||||
|
@ -391,9 +391,9 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Flags & RDW_FRAME)
|
if (Flags & RDW_FRAME)
|
||||||
Window->Flags |= WINDOWOBJECT_NEED_NCPAINT;
|
Window->state |= WINDOWOBJECT_NEED_NCPAINT;
|
||||||
if (Flags & RDW_ERASE)
|
if (Flags & RDW_ERASE)
|
||||||
Window->Flags |= WINDOWOBJECT_NEED_ERASEBKGND;
|
Window->state |= WINDOWOBJECT_NEED_ERASEBKGND;
|
||||||
|
|
||||||
Flags |= RDW_FRAME;
|
Flags |= RDW_FRAME;
|
||||||
}
|
}
|
||||||
|
@ -412,21 +412,21 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Window->UpdateRegion == NULL)
|
if (Window->UpdateRegion == NULL)
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBKGND;
|
Window->state &= ~WINDOWOBJECT_NEED_ERASEBKGND;
|
||||||
if (Flags & RDW_NOFRAME)
|
if (Flags & RDW_NOFRAME)
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT;
|
Window->state &= ~WINDOWOBJECT_NEED_NCPAINT;
|
||||||
if (Flags & RDW_NOERASE)
|
if (Flags & RDW_NOERASE)
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBKGND;
|
Window->state &= ~WINDOWOBJECT_NEED_ERASEBKGND;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Flags & RDW_INTERNALPAINT)
|
if (Flags & RDW_INTERNALPAINT)
|
||||||
{
|
{
|
||||||
Window->Flags |= WINDOWOBJECT_NEED_INTERNALPAINT;
|
Window->state |= WINDOWOBJECT_NEED_INTERNALPAINT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Flags & RDW_NOINTERNALPAINT)
|
if (Flags & RDW_NOINTERNALPAINT)
|
||||||
{
|
{
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
|
Window->state &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -459,8 +459,8 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
HasPaintMessage = Window->UpdateRegion != NULL ||
|
HasPaintMessage = Window->UpdateRegion != NULL ||
|
||||||
Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT;
|
Window->state & WINDOWOBJECT_NEED_INTERNALPAINT;
|
||||||
HasNCPaintMessage = Window->Flags & WINDOWOBJECT_NEED_NCPAINT;
|
HasNCPaintMessage = Window->state & WINDOWOBJECT_NEED_NCPAINT;
|
||||||
|
|
||||||
if (HasPaintMessage != HadPaintMessage)
|
if (HasPaintMessage != HadPaintMessage)
|
||||||
{
|
{
|
||||||
|
@ -612,8 +612,8 @@ IntIsWindowDirty(PWINDOW_OBJECT Window)
|
||||||
PWND Wnd = Window->Wnd;
|
PWND Wnd = Window->Wnd;
|
||||||
return (Wnd->style & WS_VISIBLE) &&
|
return (Wnd->style & WS_VISIBLE) &&
|
||||||
((Window->UpdateRegion != NULL) ||
|
((Window->UpdateRegion != NULL) ||
|
||||||
(Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT) ||
|
(Window->state & WINDOWOBJECT_NEED_INTERNALPAINT) ||
|
||||||
(Window->Flags & WINDOWOBJECT_NEED_NCPAINT));
|
(Window->state & WINDOWOBJECT_NEED_NCPAINT));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND FASTCALL
|
HWND FASTCALL
|
||||||
|
@ -770,12 +770,12 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
|
||||||
|
|
||||||
co_UserHideCaret(Window);
|
co_UserHideCaret(Window);
|
||||||
|
|
||||||
if (Window->Flags & WINDOWOBJECT_NEED_NCPAINT)
|
if (Window->state & WINDOWOBJECT_NEED_NCPAINT)
|
||||||
{
|
{
|
||||||
HRGN hRgn;
|
HRGN hRgn;
|
||||||
|
|
||||||
hRgn = IntGetNCUpdateRgn(Window, FALSE);
|
hRgn = IntGetNCUpdateRgn(Window, FALSE);
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT;
|
Window->state &= ~WINDOWOBJECT_NEED_NCPAINT;
|
||||||
MsqDecPaintCountQueue(Window->MessageQueue);
|
MsqDecPaintCountQueue(Window->MessageQueue);
|
||||||
co_IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)hRgn, 0);
|
co_IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)hRgn, 0);
|
||||||
if (hRgn != (HANDLE)1 && hRgn != NULL)
|
if (hRgn != (HANDLE)1 && hRgn != NULL)
|
||||||
|
@ -803,17 +803,17 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT)
|
if (Window->state & WINDOWOBJECT_NEED_INTERNALPAINT)
|
||||||
MsqDecPaintCountQueue(Window->MessageQueue);
|
MsqDecPaintCountQueue(Window->MessageQueue);
|
||||||
|
|
||||||
IntGetClientRect(Window, &Ps.rcPaint);
|
IntGetClientRect(Window, &Ps.rcPaint);
|
||||||
}
|
}
|
||||||
|
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
|
Window->state &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
|
||||||
|
|
||||||
if (Window->Flags & WINDOWOBJECT_NEED_ERASEBKGND)
|
if (Window->state & WINDOWOBJECT_NEED_ERASEBKGND)
|
||||||
{
|
{
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBKGND;
|
Window->state &= ~WINDOWOBJECT_NEED_ERASEBKGND;
|
||||||
Ps.fErase = !co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)Ps.hdc, 0);
|
Ps.fErase = !co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)Ps.hdc, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -68,8 +68,8 @@ VIS_ComputeVisibleRegion(
|
||||||
CurrentWindow = Window->spwndParent;
|
CurrentWindow = Window->spwndParent;
|
||||||
while (CurrentWindow)
|
while (CurrentWindow)
|
||||||
{
|
{
|
||||||
if ( CurrentWindow->Status & WINDOWSTATUS_DESTROYING ||
|
if ( CurrentWindow->state & WINDOWSTATUS_DESTROYING || // state2
|
||||||
CurrentWindow->Status & WINDOWSTATUS_DESTROYED )
|
CurrentWindow->state & WINDOWSTATUS_DESTROYED )
|
||||||
{
|
{
|
||||||
DPRINT1("ATM the Current Window or Parent is dead!\n");
|
DPRINT1("ATM the Current Window or Parent is dead!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -123,7 +123,7 @@ PWINDOW_OBJECT FASTCALL UserGetWindowObject(HWND hWnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
Window = (PWINDOW_OBJECT)UserGetObject(gHandleTable, hWnd, otWindow);
|
Window = (PWINDOW_OBJECT)UserGetObject(gHandleTable, hWnd, otWindow);
|
||||||
if (!Window || 0 != (Window->Status & WINDOWSTATUS_DESTROYED))
|
if (!Window || 0 != (Window->state & WINDOWSTATUS_DESTROYED))
|
||||||
{
|
{
|
||||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -365,12 +365,12 @@ static LRESULT co_UserFreeWindow(PWINDOW_OBJECT Window,
|
||||||
|
|
||||||
Wnd = Window->Wnd;
|
Wnd = Window->Wnd;
|
||||||
|
|
||||||
if(Window->Status & WINDOWSTATUS_DESTROYING)
|
if(Window->state & WINDOWSTATUS_DESTROYING)
|
||||||
{
|
{
|
||||||
DPRINT("Tried to call IntDestroyWindow() twice\n");
|
DPRINT("Tried to call IntDestroyWindow() twice\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Window->Status |= WINDOWSTATUS_DESTROYING;
|
Window->state |= WINDOWSTATUS_DESTROYING;
|
||||||
Wnd->style &= ~WS_VISIBLE;
|
Wnd->style &= ~WS_VISIBLE;
|
||||||
|
|
||||||
IntNotifyWinEvent(EVENT_OBJECT_DESTROY, Wnd, OBJID_WINDOW, 0);
|
IntNotifyWinEvent(EVENT_OBJECT_DESTROY, Wnd, OBJID_WINDOW, 0);
|
||||||
|
@ -431,7 +431,7 @@ static LRESULT co_UserFreeWindow(PWINDOW_OBJECT Window,
|
||||||
MsqRemoveWindowMessagesFromQueue(Window);
|
MsqRemoveWindowMessagesFromQueue(Window);
|
||||||
|
|
||||||
/* from now on no messages can be sent to this window anymore */
|
/* from now on no messages can be sent to this window anymore */
|
||||||
Window->Status |= WINDOWSTATUS_DESTROYED;
|
Window->state |= WINDOWSTATUS_DESTROYED;
|
||||||
Wnd->state |= WNDS_DESTROYED;
|
Wnd->state |= WNDS_DESTROYED;
|
||||||
Wnd->fnid |= FNID_FREED;
|
Wnd->fnid |= FNID_FREED;
|
||||||
|
|
||||||
|
@ -1315,7 +1315,7 @@ IntAnyPopup(VOID)
|
||||||
BOOL FASTCALL
|
BOOL FASTCALL
|
||||||
IntIsWindowInDestroy(PWINDOW_OBJECT Window)
|
IntIsWindowInDestroy(PWINDOW_OBJECT Window)
|
||||||
{
|
{
|
||||||
return ((Window->Status & WINDOWSTATUS_DESTROYING) == WINDOWSTATUS_DESTROYING);
|
return ((Window->state & WINDOWSTATUS_DESTROYING) == WINDOWSTATUS_DESTROYING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1339,7 +1339,7 @@ IntGetWindowPlacement(PWINDOW_OBJECT Window, WINDOWPLACEMENT *lpwndpl)
|
||||||
{
|
{
|
||||||
lpwndpl->showCmd = SW_HIDE;
|
lpwndpl->showCmd = SW_HIDE;
|
||||||
}
|
}
|
||||||
else if (0 != (Window->Flags & WINDOWOBJECT_RESTOREMAX) ||
|
else if (0 != (Window->state & WINDOWOBJECT_RESTOREMAX) ||
|
||||||
0 != (Wnd->style & WS_MAXIMIZE))
|
0 != (Wnd->style & WS_MAXIMIZE))
|
||||||
{
|
{
|
||||||
lpwndpl->showCmd = SW_MAXIMIZE;
|
lpwndpl->showCmd = SW_MAXIMIZE;
|
||||||
|
@ -1850,7 +1850,7 @@ AllocErr:
|
||||||
{
|
{
|
||||||
/* If there is no desktop window yet, we must be creating it */
|
/* If there is no desktop window yet, we must be creating it */
|
||||||
pti->Desktop->DesktopWindow = hWnd;
|
pti->Desktop->DesktopWindow = hWnd;
|
||||||
pti->Desktop->DesktopInfo->Wnd = Wnd;
|
pti->Desktop->pDeskInfo->Wnd = Wnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2014,7 +2014,7 @@ AllocErr:
|
||||||
if (!(dwStyle & WS_POPUP))
|
if (!(dwStyle & WS_POPUP))
|
||||||
{
|
{
|
||||||
dwStyle |= WS_CAPTION;
|
dwStyle |= WS_CAPTION;
|
||||||
Window->Flags |= WINDOWOBJECT_NEED_SIZE;
|
Window->state |= WINDOWOBJECT_NEED_SIZE;
|
||||||
DPRINT("4: Style is now %lx\n", dwStyle);
|
DPRINT("4: Style is now %lx\n", dwStyle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2334,7 +2334,7 @@ AllocErr:
|
||||||
IntNotifyWinEvent(EVENT_OBJECT_CREATE, Window->Wnd, OBJID_WINDOW, 0);
|
IntNotifyWinEvent(EVENT_OBJECT_CREATE, Window->Wnd, OBJID_WINDOW, 0);
|
||||||
|
|
||||||
/* Send move and size messages. */
|
/* Send move and size messages. */
|
||||||
if (!(Window->Flags & WINDOWOBJECT_NEED_SIZE))
|
if (!(Window->state & WINDOWOBJECT_NEED_SIZE))
|
||||||
{
|
{
|
||||||
LONG lParam;
|
LONG lParam;
|
||||||
|
|
||||||
|
@ -4070,7 +4070,7 @@ NtUserGetWindowPlacement(HWND hWnd,
|
||||||
{
|
{
|
||||||
Safepl.showCmd = SW_HIDE;
|
Safepl.showCmd = SW_HIDE;
|
||||||
}
|
}
|
||||||
else if ((0 != (Window->Flags & WINDOWOBJECT_RESTOREMAX) ||
|
else if ((0 != (Window->state & WINDOWOBJECT_RESTOREMAX) ||
|
||||||
0 != (Wnd->style & WS_MAXIMIZE)) &&
|
0 != (Wnd->style & WS_MAXIMIZE)) &&
|
||||||
0 == (Wnd->style & WS_MINIMIZE))
|
0 == (Wnd->style & WS_MINIMIZE))
|
||||||
{
|
{
|
||||||
|
|
|
@ -325,12 +325,12 @@ co_WinPosMinMaximize(PWINDOW_OBJECT Window, UINT ShowFlag, RECT* NewPos)
|
||||||
{
|
{
|
||||||
if (Wnd->style & WS_MAXIMIZE)
|
if (Wnd->style & WS_MAXIMIZE)
|
||||||
{
|
{
|
||||||
Window->Flags |= WINDOWOBJECT_RESTOREMAX;
|
Window->state |= WINDOWOBJECT_RESTOREMAX;
|
||||||
Wnd->style &= ~WS_MAXIMIZE;
|
Wnd->style &= ~WS_MAXIMIZE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Window->Flags &= ~WINDOWOBJECT_RESTOREMAX;
|
Window->state &= ~WINDOWOBJECT_RESTOREMAX;
|
||||||
}
|
}
|
||||||
co_UserRedrawWindow(Window, NULL, 0, RDW_VALIDATE | RDW_NOERASE |
|
co_UserRedrawWindow(Window, NULL, 0, RDW_VALIDATE | RDW_NOERASE |
|
||||||
RDW_NOINTERNALPAINT);
|
RDW_NOINTERNALPAINT);
|
||||||
|
@ -364,7 +364,7 @@ co_WinPosMinMaximize(PWINDOW_OBJECT Window, UINT ShowFlag, RECT* NewPos)
|
||||||
if (Wnd->style & WS_MINIMIZE)
|
if (Wnd->style & WS_MINIMIZE)
|
||||||
{
|
{
|
||||||
Wnd->style &= ~WS_MINIMIZE;
|
Wnd->style &= ~WS_MINIMIZE;
|
||||||
if (Window->Flags & WINDOWOBJECT_RESTOREMAX)
|
if (Window->state & WINDOWOBJECT_RESTOREMAX)
|
||||||
{
|
{
|
||||||
co_WinPosGetMinMaxInfo(Window, &Size,
|
co_WinPosGetMinMaxInfo(Window, &Size,
|
||||||
&Wnd->InternalPos.MaxPos, NULL, NULL);
|
&Wnd->InternalPos.MaxPos, NULL, NULL);
|
||||||
|
@ -1478,12 +1478,12 @@ co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
|
||||||
|
|
||||||
/* FIXME: Check for window destruction. */
|
/* FIXME: Check for window destruction. */
|
||||||
|
|
||||||
if ((Window->Flags & WINDOWOBJECT_NEED_SIZE) &&
|
if ((Window->state & WINDOWOBJECT_NEED_SIZE) &&
|
||||||
!(Window->Status & WINDOWSTATUS_DESTROYING))
|
!(Window->state & WINDOWSTATUS_DESTROYING))
|
||||||
{
|
{
|
||||||
WPARAM wParam = SIZE_RESTORED;
|
WPARAM wParam = SIZE_RESTORED;
|
||||||
|
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_SIZE;
|
Window->state &= ~WINDOWOBJECT_NEED_SIZE;
|
||||||
if (Wnd->style & WS_MAXIMIZE)
|
if (Wnd->style & WS_MAXIMIZE)
|
||||||
{
|
{
|
||||||
wParam = SIZE_MAXIMIZED;
|
wParam = SIZE_MAXIMIZED;
|
||||||
|
|
Loading…
Reference in a new issue