[Project_owners] topmost window/dialog?

HJ bugs4hj at netscape.net
Mon Mar 27 03:19:32 EST 2006


Neil wrote:
> Eric H. Jung wrote:
> 
>> --- HJ <bugs4hj at netscape.net> wrote:
>>
>>> Eric H. Jung wrote:
>>>   
>>>> Do you think there's a way to change the zlevel dynamically at 
>>>> runtime from alwaysRaised (zlevel=6) to 5?
>>>>     
>>> Yes, you can use:
>>>
>>> const CI = Components.interfaces;
>>> var xulwin = window.QueryInterface(CI.nsIInterfaceRequestor)
>>> .getInterface(CI.nsIWebNavigation)
>>> .QueryInterface(CI.nsIDocShellTreeItem)
>>> .treeOwner
>>> .QueryInterface(CI.nsIInterfaceRequestor)
>>> .getInterface(CI.nsIXULWindow);
>>>
>>> xulwin.zLevel = xulwin.normalZ;
>>> xulwin.zLevel = xulwin.raisedZ;
>>>
>> Wow, you're a genius.

Nah, I just use this at least since this CVS check in:

"Mon Sep 22 17:57:11 2003 UTC (2 years, 6 months ago) by hj"

and probably even longer because I normally use my code for some time, 
before exposing it to others :-)

> Either that or he read toolkit/components/help/help.js (or maybe some 
> precursor bug) ;-)

I hadn't looked at it before, until now, and so I learned that it won't 
work on Linux (yikes). Thanks Neil.

Erik, I just keep an eye on *all* changes to .idl files (and the 
corresponding C files) because that is where the info comes from ;)

/HJ


More information about the Project_owners mailing list