Hi Sergey,
No I didn't try it yet, but it looks like
NSApplicationDidChangeScreenParametersNotification has no means to
distinguish between display resolution change, attaching new display or
insets changes.
This way
<http://stackoverflow.com/questions/7901826/cocoa-dock-fires-nsapplicationdidchangescreenparametersnotification>
to check seems to me a bit weird.
Will it be acceptable if we receive the notification twice in case
of screen resolution change? (from both
NSApplicationDidChangeScreenParametersNotification and
CGDisplayReconfigurationCallBack)
What do you think?
Thanks!
Anton.
On 13.02.2015 20:09, Sergey Bylokhov wrote:
Hi, Anton.
This cache was added intentionally, but the reason was not a performance but a
way to skip locking against Appkit thread. Because in some cases we got a
deadlocks. Your suggestion to use
NSApplicationDidChangeScreenParametersNotificationin is correct way to fix
this. Do you try to implement it?
----- anton.nashaty...@oracle.com wrote:
Hello,
could you please review the following fix:
fix: http://cr.openjdk.java.net/~anashaty/8072069/9/webrev.00/
<http://cr.openjdk.java.net/%7Eanashaty/8072069/9/webrev.00/>
bug: https://bugs.openjdk.java.net/browse/JDK-8072069
Problem: Toolkit.getScreenInsets() returns old value after Dock
moved/resized on Mac
Fix: remove the value caching and always ask native for insets.
This shouldn't cause any performance drawbacks since the
getScreenInsets() is rarely called (mostly on window init and on popup
positioning).
Thanks!
Anton.