mirror of
https://github.com/reactos/reactos.git
synced 2025-08-08 11:33:06 +00:00
Prefer non-topmost windows when activating another window
svn path=/trunk/; revision=9776
This commit is contained in:
parent
db14b748c7
commit
b24bc6c8de
1 changed files with 21 additions and 15 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: winpos.c,v 1.117 2004/06/20 00:45:37 navaraf Exp $
|
/* $Id: winpos.c,v 1.118 2004/06/20 22:27:19 gvg Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -107,6 +107,7 @@ VOID FASTCALL
|
||||||
WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
|
WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT Wnd, Old;
|
PWINDOW_OBJECT Wnd, Old;
|
||||||
|
int TryTopmost;
|
||||||
|
|
||||||
if (!Window || IntIsDesktopWindow(Window))
|
if (!Window || IntIsDesktopWindow(Window))
|
||||||
{
|
{
|
||||||
|
@ -131,6 +132,8 @@ WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
|
||||||
}
|
}
|
||||||
|
|
||||||
if((List = IntWinListChildren(Wnd)))
|
if((List = IntWinListChildren(Wnd)))
|
||||||
|
{
|
||||||
|
for(TryTopmost = 0; TryTopmost <= 1; TryTopmost++)
|
||||||
{
|
{
|
||||||
for(phWnd = List; *phWnd; phWnd++)
|
for(phWnd = List; *phWnd; phWnd++)
|
||||||
{
|
{
|
||||||
|
@ -143,7 +146,9 @@ WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
|
||||||
|
|
||||||
if((Child = IntGetWindowObject(*phWnd)))
|
if((Child = IntGetWindowObject(*phWnd)))
|
||||||
{
|
{
|
||||||
if(IntSetForegroundWindow(Child))
|
if(((! TryTopmost && (0 == (Child->ExStyle & WS_EX_TOPMOST)))
|
||||||
|
|| (TryTopmost && (0 != (Child->ExStyle & WS_EX_TOPMOST))))
|
||||||
|
&& IntSetForegroundWindow(Child))
|
||||||
{
|
{
|
||||||
ExFreePool(List);
|
ExFreePool(List);
|
||||||
IntReleaseWindowObject(Wnd);
|
IntReleaseWindowObject(Wnd);
|
||||||
|
@ -153,6 +158,7 @@ WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
|
||||||
IntReleaseWindowObject(Child);
|
IntReleaseWindowObject(Child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ExFreePool(List);
|
ExFreePool(List);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue