VW7.3.1 - A way to check whether a window is on top of display

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

VW7.3.1 - A way to check whether a window is on top of display

BREITH Karl-Albert (AREVA)
 
VW7.3.1:
Is there a way to check whether a window is on top of display ?
 
A window is opened and displayed. Then the mouse is moved to another window,
which becomes the top window due to a sensitive mouse.
The isActive or isVisible methods return true, even if the window is (due to the
sensitive mouse) behind other windows.
How can I check whether a window is really on the top or at least really visible ?
 
Karl
 
________________________________________________________________
Karl-Albert Breith
AREVA NP GmbH
FEEC - G
Freyeslebenstrasse 1
91058 Erlangen
Phone: +49 (0) 9131 18-97393
Fax: +49 (0) 9131 18-94045
mail to:  [hidden email]
An AREVA and Siemens company
 
Reply | Threaded
Open this post in threaded view
|

Re: VW7.3.1 - A way to check whether a window is on top of display

Ralf Propach
BREITH Karl-Albert FEEC-G (AREVA NP GmbH) wrote:

>  
> VW7.3.1:
> Is there a way to check whether a window is on top of display ?
>  
> A window is opened and displayed. Then the mouse is moved to another
> window,
> which becomes the top window due to a sensitive mouse.
> The isActive or isVisible methods return true, even if the window is
> (due to the
> sensitive mouse) behind other windows.
> How can I check whether a window is really on the top or at least really
> visible ?
>  

Screen default queryStackingOrder collect: [:h | DisplaySurface findRegistrant: h]

lists the windows on the screen from bottom to top. So if

myWindow == DisplaySurface findRegistrant: Screen default queryStackingOrder last

is true then myWindow is not behind another window. But since there can be more than one
window that is not covered by other windows, this expression can be false even if
myWindow is completely visible. You need to compare its position with the position of all windows
"above" it to check that it is not hidden by these windows.

HTH,

Ralf Propach
Georg Heeg eK