mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
Separate Default Window proc from messages.
svn path=/trunk/; revision=34476
This commit is contained in:
parent
f0ba3800a4
commit
97892224cf
|
@ -164,6 +164,9 @@ IntIsWindowInDestroy(PWINDOW_OBJECT Window);
|
|||
BOOL FASTCALL
|
||||
IntShowOwnedPopups( PWINDOW_OBJECT owner, BOOL fShow );
|
||||
|
||||
LRESULT FASTCALL
|
||||
IntDefWindowProc( PWINDOW_OBJECT Window, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
#endif /* _WIN32K_WINDOW_H */
|
||||
|
||||
/* EOF */
|
||||
|
|
61
reactos/subsystems/win32/win32k/ntuser/defwnd.c
Normal file
61
reactos/subsystems/win32/win32k/ntuser/defwnd.c
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: Misc User funcs
|
||||
* FILE: subsystem/win32/win32k/ntuser/defwnd.c
|
||||
* PROGRAMER:
|
||||
* REVISION HISTORY:
|
||||
* 2003/05/22 Created
|
||||
*/
|
||||
|
||||
#include <w32k.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
|
||||
/*
|
||||
Win32k counterpart of User DefWindowProc
|
||||
*/
|
||||
LRESULT FASTCALL
|
||||
IntDefWindowProc(
|
||||
PWINDOW_OBJECT Window,
|
||||
UINT Msg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
PWINDOW Wnd;
|
||||
|
||||
if (Msg > WM_USER) return 0;
|
||||
|
||||
Wnd = Window->Wnd;
|
||||
if (!Wnd) return 0;
|
||||
|
||||
switch (Msg)
|
||||
{
|
||||
case WM_SHOWWINDOW:
|
||||
{
|
||||
if ((Wnd->Style & WS_VISIBLE) && wParam) break;
|
||||
if (!(Wnd->Style & WS_VISIBLE) && !wParam) break;
|
||||
if (!Window->hOwner) break;
|
||||
if (LOWORD(lParam))
|
||||
{
|
||||
if (wParam)
|
||||
{
|
||||
if (!(Window->Flags & WIN_NEEDS_SHOW_OWNEDPOPUP)) break;
|
||||
Window->Flags &= ~WIN_NEEDS_SHOW_OWNEDPOPUP;
|
||||
}
|
||||
else
|
||||
Window->Flags |= WIN_NEEDS_SHOW_OWNEDPOPUP;
|
||||
|
||||
co_WinPosShowWindow(Window, wParam ? SW_SHOWNOACTIVATE : SW_HIDE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
|
@ -1832,49 +1832,6 @@ IntUninitMessagePumpHook()
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
Win32k counterpart of User DefWindowProc
|
||||
*/
|
||||
LRESULT FASTCALL
|
||||
IntDefWindowProc(
|
||||
PWINDOW_OBJECT Window,
|
||||
UINT Msg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
PWINDOW Wnd;
|
||||
|
||||
if (Msg > WM_USER) return 0;
|
||||
|
||||
Wnd = Window->Wnd;
|
||||
if (!Wnd) return 0;
|
||||
|
||||
switch (Msg)
|
||||
{
|
||||
case WM_SHOWWINDOW:
|
||||
{
|
||||
if ((Wnd->Style & WS_VISIBLE) && wParam) break;
|
||||
if (!(Wnd->Style & WS_VISIBLE) && !wParam) break;
|
||||
if (!Window->hOwner) break;
|
||||
if (LOWORD(lParam))
|
||||
{
|
||||
if (wParam)
|
||||
{
|
||||
if (!(Window->Flags & WIN_NEEDS_SHOW_OWNEDPOPUP)) break;
|
||||
Window->Flags &= ~WIN_NEEDS_SHOW_OWNEDPOPUP;
|
||||
}
|
||||
else
|
||||
Window->Flags |= WIN_NEEDS_SHOW_OWNEDPOPUP;
|
||||
|
||||
co_WinPosShowWindow(Window, wParam ? SW_SHOWNOACTIVATE : SW_HIDE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
LRESULT STDCALL
|
||||
NtUserMessageCall(
|
||||
|
|
|
@ -110,6 +110,7 @@
|
|||
<file>clipboard.c</file>
|
||||
<file>csr.c</file>
|
||||
<file>cursoricon.c</file>
|
||||
<file>defwnd.c</file>
|
||||
<file>desktop.c</file>
|
||||
<file>display.c</file>
|
||||
<file>event.c</file>
|
||||
|
|
Loading…
Reference in a new issue