Author: jimtabor
Date: Wed Mar 20 22:31:42 2013
New Revision: 58562
URL:
http://svn.reactos.org/svn/reactos?rev=58562&view=rev
Log:
[Win32k|User32]
- Use set foreground instead of setting active during a mouse click. Add support hack
since this should be handled on server side.
- This is an ATI patch fix.
Modified:
trunk/reactos/win32ss/user/ntuser/focus.c
trunk/reactos/win32ss/user/ntuser/focus.h
trunk/reactos/win32ss/user/ntuser/simplecall.c
trunk/reactos/win32ss/user/user32/windows/nonclient.c
Modified: trunk/reactos/win32ss/user/ntuser/focus.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/focus.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] Wed Mar 20 22:31:42 2013
@@ -866,6 +866,17 @@
API Call
*/
BOOL FASTCALL
+co_IntSetForegroundWindowMouse(PWND Window)
+{
+ if (Window) ASSERT_REFS_CO(Window);
+
+ return co_IntSetForegroundAndFocusWindow(Window, TRUE);
+}
+
+/*
+ API Call
+*/
+BOOL FASTCALL
IntLockSetForegroundWindow(UINT uLockCode)
{
ULONG Err = ERROR_ACCESS_DENIED;
Modified: trunk/reactos/win32ss/user/ntuser/focus.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/focus.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/focus.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/focus.h [iso-8859-1] Wed Mar 20 22:31:42 2013
@@ -19,5 +19,6 @@
BOOL FASTCALL co_IntMouseActivateWindow(PWND Window);
BOOL FASTCALL co_IntSetForegroundWindow(PWND Window);
BOOL FASTCALL co_IntSetActiveWindow(PWND,HWND *,BOOL,BOOL,BOOL);
+BOOL FASTCALL co_IntSetForegroundWindowMouse(PWND Window);
BOOL FASTCALL IntLockSetForegroundWindow(UINT uLockCode);
BOOL FASTCALL IntAllowSetForegroundWindow(DWORD dwProcessId);
Modified: trunk/reactos/win32ss/user/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/simple…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] Wed Mar 20 22:31:42 2013
@@ -577,6 +577,12 @@
TRACE("co_IntSetForegroundWindow 2 \n");
break;
+ case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE:
+ TRACE("co_IntSetForegroundWindow 1 0x%p\n",hWnd);
+ Ret = co_IntSetForegroundWindowMouse(Window);
+ TRACE("co_IntSetForegroundWindow 2 0x%p\n",hWnd);
+ break;
+
case HWNDLOCK_ROUTINE_UPDATEWINDOW:
Ret = co_UserRedrawWindow( Window, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN);
break;
Modified: trunk/reactos/win32ss/user/user32/windows/nonclient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/nonclient.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/nonclient.c [iso-8859-1] Wed Mar 20 22:31:42
2013
@@ -987,7 +987,8 @@
case HTCAPTION:
{
HWND hTopWnd = GetAncestor(hWnd, GA_ROOT);
- if (SetActiveWindow(hTopWnd) || GetActiveWindow() == hTopWnd)
+ if ( NtUserCallHwndLock(hTopWnd, HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE) ||
+ GetActiveWindow() == hTopWnd)
{
SendMessageW(hWnd, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, lParam);
}