2
votes

Does anybody know if we can get the orders of all opened nativeWindows ?

I would like to compare two nativeWindows, and find which window is above.

Thanks !

Edit : NativeApplication.nativeApplication.openedWindows return an array of all opened nativeWindows.

But the windows is in the order they were opened. Not in the depth order... For example, if we click on a window, it will take the first place, but its position in this array doesn't change.

Is there another array where the windows would be in this order ? Or another way ton find it ?

Thanks a lot.

1
I think you'll have to create your own Z-Order Manager; perhaps with your own custom Native Window and/or Native Window opener so that you can track when a Window is given focus.JeffryHouser

1 Answers

0
votes

As far as I know there is no native way of doing this. If you need to ensure the correct window is at the top / bottom of the stack based on some condition, you can use the orderToFront and orderToback methods (see documentation).

If your requirements are more complex, you could consider implementing your own system for tracking the depths (re-order your array when any of the order methods are called or the activate and close events are fired).