RFR: 8305352: updateIconImages may lead to deadlock after JDK-8276849

Alexey Ivanov aivanov at openjdk.org
Fri Apr 21 16:50:48 UTC 2023


On Fri, 21 Apr 2023 15:07:17 GMT, Dmitry Cherepanov <dcherepanov at openjdk.org> wrote:

> > But it will be ignored if the window is invisible.
> 
> If we show/hide a window and then change DPI settings, then notifications will be ignored. But as soon as we show the window next time, we'll get new updateGC notification artifically initiated from WWindowPeer.show (https://github.com/openjdk/jdk/blob/master/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java#L287). Later, when the window will be displayed on the screen, it will have the updated icon without delay.
> 
> It's a low-risk change that fixes the regression and keeps the original scenario working. It looks safe to backport to JDK 20 update.

If the window is not visible, `updateGC` gets called when the window is shown; if the window is already visible, nothing changes. Thus, the icon will be updated in all the cases.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13263#issuecomment-1518091534



More information about the client-libs-dev mailing list