[ros-diffs] [jimtabor] 34696: - Fix NtUserCallMsgFilter to use SEH. Add support for system commands related to hooks.
jimtabor at svn.reactos.org
jimtabor at svn.reactos.org
Wed Jul 23 21:59:21 CEST 2008
- Previous message: [ros-diffs] [fireball] 34695: - Partly revert 24104: "I do not known if I done right in NtGdiRealizePalette step2, step2 is not tested." - if you don't know, don't do at all! Memory DC "supports drawing operations on a bitmap" according to MSDN, so why changing device's palette? I think it was not done for a reason, and if you can't test, don't touch before you have a test application. - Reformat another part of 24104, and include warning messages too, to track palette failures. - Put two mandatory debug prints to see when the code is being hit (one to memory managed DC case, and another one to the code commented out by Jim). - Tested with abiword, FF 1.5 and 2.0, openoffice 2.0 installer, in 8, 24 and 32 bit color modes, no problem arised, and no debug messages flood happened.
- Next message: [ros-diffs] [jimtabor] 34697: Enable message filter hooks and add call hook support for debug hook.
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jimtabor
Date: Wed Jul 23 14:59:20 2008
New Revision: 34696
URL: http://svn.reactos.org/svn/reactos?rev=34696&view=rev
Log:
- Fix NtUserCallMsgFilter to use SEH. Add support for system commands related to hooks.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/defwnd.c
trunk/reactos/subsystems/win32/win32k/ntuser/message.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/defwnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/defwnd.c?rev=34696&r1=34695&r2=34696&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/defwnd.c [iso-8859-1] Wed Jul 23 14:59:20 2008
@@ -12,7 +12,25 @@
#define NDEBUG
#include <debug.h>
+LRESULT FASTCALL
+IntDefWinHandleSysCommand( PWINDOW_OBJECT Window, WPARAM wParam, LPARAM lParam , BOOL Ansi)
+{
+ DPRINT1("hwnd %p WM_SYSCOMMAND %lx %lx\n", Window->hSelf, wParam, lParam );
+ if (!ISITHOOKED(WH_CBT)) return 0;
+
+ if (!UserCallNextHookEx(WH_CBT, HCBT_SYSCOMMAND, wParam, lParam, Ansi))
+ return 0;
+
+ switch (wParam & 0xfff0)
+ {
+ case SC_MOVE:
+ case SC_SIZE:
+ return UserCallNextHookEx(WH_CBT, HCBT_MOVESIZE, (WPARAM)Window->hSelf, lParam, Ansi);
+ break;
+ }
+ return 1;
+}
/*
Win32k counterpart of User DefWindowProc
*/
@@ -25,6 +43,7 @@
BOOL Ansi)
{
PWINDOW Wnd;
+ LRESULT lResult = 0;
if (Msg > WM_USER) return 0;
@@ -33,6 +52,11 @@
switch (Msg)
{
+ case WM_SYSCOMMAND:
+ {
+ lResult = IntDefWinHandleSysCommand( Window, wParam, lParam, Ansi );
+ break;
+ }
case WM_SHOWWINDOW:
{
if ((Wnd->Style & WS_VISIBLE) && wParam) break;
@@ -54,7 +78,7 @@
break;
}
- return 0;
+ return lResult;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/message.c?rev=34696&r1=34695&r2=34696&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Wed Jul 23 14:59:20 2008
@@ -306,9 +306,9 @@
DPRINT("Enter NtUserCallMsgFilter\n");
UserEnterExclusive();
- if (co_HOOK_CallHooks( WH_SYSMSGFILTER, code, 0, (LPARAM)msg))
+ if ( UserCallNextHookEx( WH_SYSMSGFILTER, code, 0, (LPARAM)msg, FALSE))
RETURN( TRUE);
- RETURN( co_HOOK_CallHooks( WH_MSGFILTER, code, 0, (LPARAM)msg));
+ RETURN( UserCallNextHookEx( WH_MSGFILTER, code, 0, (LPARAM)msg, FALSE));
CLEANUP:
DPRINT("Leave NtUserCallMsgFilter. ret=%i\n", _ret_);
- Previous message: [ros-diffs] [fireball] 34695: - Partly revert 24104: "I do not known if I done right in NtGdiRealizePalette step2, step2 is not tested." - if you don't know, don't do at all! Memory DC "supports drawing operations on a bitmap" according to MSDN, so why changing device's palette? I think it was not done for a reason, and if you can't test, don't touch before you have a test application. - Reformat another part of 24104, and include warning messages too, to track palette failures. - Put two mandatory debug prints to see when the code is being hit (one to memory managed DC case, and another one to the code commented out by Jim). - Tested with abiword, FF 1.5 and 2.0, openoffice 2.0 installer, in 8, 24 and 32 bit color modes, no problem arised, and no debug messages flood happened.
- Next message: [ros-diffs] [jimtabor] 34697: Enable message filter hooks and add call hook support for debug hook.
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Ros-diffs
mailing list