Author: jimtabor
Date: Sun Jan 18 22:39:56 2015
New Revision: 66055
URL:
http://svn.reactos.org/svn/reactos?rev=66055&view=rev
Log:
[NtUser]
- Fix return to previously active window. See CORE-106.
Modified:
trunk/reactos/win32ss/user/ntuser/window.c
trunk/reactos/win32ss/user/ntuser/winpos.c
Modified: trunk/reactos/win32ss/user/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Sun Jan 18 22:39:56 2015
@@ -2594,7 +2594,8 @@
*/
if (!co_WinPosShowWindow(Window, SW_HIDE))
{ // Rule #1.
- if (ti->MessageQueue->spwndActive == Window && ti->MessageQueue ==
IntGetFocusMessageQueue())
+ if ( ti->MessageQueue->spwndActive == Window ||
+ (ti->MessageQueue->spwndActive == NULL && ti->MessageQueue ==
IntGetFocusMessageQueue()) )
{
co_WinPosActivateOtherWindow(Window);
}
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] Sun Jan 18 22:39:56 2015
@@ -349,11 +349,16 @@
{
WndTo = Wnd->head.pti->MessageQueue->spwndActivePrev;
if (can_activate_window( WndTo )) goto done;
- }
-
- // Find any window to bring to top. Works Okay for wine.
+
+ }
+
+ // Find any window to bring to top. Works Okay for wine since it does not see X11
windows.
WndTo = UserGetDesktopWindow();
WndTo = WndTo->spwndChild;
+ if ( WndTo == NULL )
+ {
+ return;
+ }
for (;;)
{
if (WndTo == Wnd)