Screen position broken for me


Weird, I can't get screen position of Juce components anymore.

i.e. getScreenBounds().getX() alwyas repport me 0 whatever the component or it's position.

getScreenX() always 0 too. same for Y.


getParentMonitorArea() gives correct dimensions though.


Weird is that I used to use those functions fine in the past any idea of what could cause this ?

Maybe something obvious I've overlooked ?

I'm on Mac book pro OSX 10.7.5 using latest tip.





Definitely works ok - if it didn't then almost everything would fail to work. Most likely you're calling it on a different object than you think you are or something?

found out my confusion.

I was calling it inside hello world, in MainComponent (which is created by HelloWorldWindow.) 

And centreWithSize() of HelloWorldWindow is called after the constructor of MainComponent

I expected different order.

Sorry for the noise !