Author: jimtabor
Date: Fri Nov 29 03:43:41 2013
New Revision: 61142
URL:
http://svn.reactos.org/svn/reactos?rev=61142&view=rev
Log:
[Win32k]
- Fix CORE-1161 and CORE-6651.
- Minor fixups.
Modified:
trunk/reactos/win32ss/user/ntuser/desktop.c
trunk/reactos/win32ss/user/ntuser/focus.c
trunk/reactos/win32ss/user/ntuser/winpos.c
Modified: trunk/reactos/win32ss/user/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/deskto…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] Fri Nov 29 03:43:41 2013
@@ -518,8 +518,16 @@
gpqForegroundPrev = Old;
}
// Only one Q can have active foreground even when there are more than one desktop.
- if (NewQueue) gpqForeground = pdo->ActiveMessageQueue;
- else gpqForeground = NULL;
+ if (NewQueue)
+ {
+ gpqForeground = pdo->ActiveMessageQueue;
+ }
+ else
+ {
+ gpqForeground = NULL;
+ ERR("ptiLastInput is CLEARED!!\n");
+ ptiLastInput = NULL; // ReactOS hacks,,,, should check for process death.
+ }
}
PWND FASTCALL
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] Fri Nov 29 03:43:41 2013
@@ -136,6 +136,31 @@
co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, flags);
}
}
+ }
+ ////
+ //// CORE-1161 and CORE-6651
+ if (Window->spwndPrev)
+ {
+ HWND *phwndTopLevel, *phwndCurrent;
+ PWND pwndCurrent, pwndDesktop;
+
+ pwndDesktop = UserGetDesktopWindow();
+ if (Window->spwndParent == pwndDesktop )
+ {
+ phwndTopLevel = IntWinListChildren(pwndDesktop);
+ phwndCurrent = phwndTopLevel;
+ while(*phwndCurrent)
+ {
+ pwndCurrent = UserGetWindowObject(*phwndCurrent);
+
+ if (pwndCurrent && pwndCurrent->spwndOwner == Window )
+ {
+ co_WinPosSetWindowPos(pwndCurrent, HWND_TOP, 0, 0, 0, 0,
SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE);
+ }
+ phwndCurrent++;
+ }
+ ExFreePool(phwndTopLevel);
+ }
}
////
OldTID = WindowPrev ? IntGetWndThreadId(WindowPrev) : NULL;
@@ -184,7 +209,7 @@
}
}
}
- ExFreePool(List);//ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
}
}
if (WindowPrev)
Modified: trunk/reactos/win32ss/user/ntuser/winpos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winpos…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] Fri Nov 29 03:43:41 2013
@@ -359,7 +359,7 @@
//ERR("WinPosActivateOtherWindow Set Active 0x%p\n",WndTo);
if (!co_IntSetActiveWindow(WndTo,FALSE,TRUE,FALSE)) /* Ok for WndTo to be NULL here
*/
{
- co_IntSetActiveWindow(0,FALSE,TRUE,FALSE);
+ co_IntSetActiveWindow(NULL,FALSE,TRUE,FALSE);
}
if (WndTo) UserDerefObjectCo(WndTo);
}