mirror of
https://github.com/reactos/reactos.git
synced 2024-07-21 19:58:08 +00:00
Try harder to find another window to activate, fixes bug #127
svn path=/trunk/; revision=7588
This commit is contained in:
parent
02fb8db0d0
commit
a07586dc9d
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: winpos.c,v 1.78 2004/01/12 00:07:34 navaraf Exp $
|
||||
/* $Id: winpos.c,v 1.79 2004/01/12 22:26:00 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -121,19 +121,34 @@ NtUserGetClientOrigin(HWND hWnd, LPPOINT Point)
|
|||
VOID FASTCALL
|
||||
WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
Window = IntGetParent(Window);
|
||||
if (!Window || IntIsDesktopWindow(Window))
|
||||
{
|
||||
IntSetFocusMessageQueue(NULL);
|
||||
return;
|
||||
}
|
||||
if (IntSetForegroundWindow(Window))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
PWINDOW_OBJECT Child;
|
||||
PWINDOW_OBJECT TabooWindow = Window;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (NULL == Window || IntIsDesktopWindow(Window))
|
||||
{
|
||||
IntSetFocusMessageQueue(NULL);
|
||||
return;
|
||||
}
|
||||
Window = Window->Parent;
|
||||
ExAcquireFastMutex(&(Window->ChildrenListLock));
|
||||
Child = Window->FirstChild;
|
||||
while (NULL != Child)
|
||||
{
|
||||
if (Child != TabooWindow)
|
||||
{
|
||||
ExReleaseFastMutex(&(Window->ChildrenListLock));
|
||||
if (IntSetForegroundWindow(Child))
|
||||
{
|
||||
return;
|
||||
}
|
||||
ExAcquireFastMutex(&(Window->ChildrenListLock));
|
||||
}
|
||||
Child = Child->NextSibling;
|
||||
}
|
||||
ExReleaseFastMutex(&(Window->ChildrenListLock));
|
||||
}
|
||||
}
|
||||
|
||||
VOID STATIC FASTCALL
|
||||
|
|
Loading…
Reference in a new issue