mirror of
https://github.com/reactos/reactos.git
synced 2025-06-13 11:38:36 +00:00
Separate Default Window proc from messages.
svn path=/trunk/; revision=34476
This commit is contained in:
parent
f0ba3800a4
commit
97892224cf
4 changed files with 65 additions and 43 deletions
|
@ -164,6 +164,9 @@ IntIsWindowInDestroy(PWINDOW_OBJECT Window);
|
||||||
BOOL FASTCALL
|
BOOL FASTCALL
|
||||||
IntShowOwnedPopups( PWINDOW_OBJECT owner, BOOL fShow );
|
IntShowOwnedPopups( PWINDOW_OBJECT owner, BOOL fShow );
|
||||||
|
|
||||||
|
LRESULT FASTCALL
|
||||||
|
IntDefWindowProc( PWINDOW_OBJECT Window, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
#endif /* _WIN32K_WINDOW_H */
|
#endif /* _WIN32K_WINDOW_H */
|
||||||
|
|
||||||
/* EOF */
|
/* 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;
|
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
|
LRESULT STDCALL
|
||||||
NtUserMessageCall(
|
NtUserMessageCall(
|
||||||
|
|
|
@ -110,6 +110,7 @@
|
||||||
<file>clipboard.c</file>
|
<file>clipboard.c</file>
|
||||||
<file>csr.c</file>
|
<file>csr.c</file>
|
||||||
<file>cursoricon.c</file>
|
<file>cursoricon.c</file>
|
||||||
|
<file>defwnd.c</file>
|
||||||
<file>desktop.c</file>
|
<file>desktop.c</file>
|
||||||
<file>display.c</file>
|
<file>display.c</file>
|
||||||
<file>event.c</file>
|
<file>event.c</file>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue