[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: RFR: JDK-8255439: System Tray icons get corrupted when windows scaling changes
From:       Harshitha Onkar <duke () openjdk ! java ! net>
Date:       2022-04-29 1:43:37
Message-ID: KiK7K2YQr0zcWbLKaij1DzTyA5mjKPR5qprXMR5UsFw=.cdccad09-f0bd-4fa6-8691-e69f9c07b1de () github ! com
[Download RAW message or body]

On Fri, 29 Apr 2022 00:36:15 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:

> Did you have a chance to check why the WM_DPICHANGED does not work, any specific \
> cases? It is used by checking the scale change for windows in AWT, and no issues \
> were reported for that as far as I know.

When DPI gets changed, many events are generated one after the other. By setting \
delays at various places in code I  observed that, the timing of triggering tray icon \
update could have effects on how it is rendered. 

When DPI is changed, along with `WM_DPICHANGED` msg the tray icon window's procedure \
receives `WMPOSCHANGING` and if we trigger a tray icon update before this, the icon \
gets distorted. I believe the cause for distortion might be - adding an icon to the \
system tray while it is still changing its size and position (WMPOSCHANGING) due to \
DPI changes. 

By triggering the update after `WMPOSCHANGING`, the tray icon gets added when all the \
updates to the System Tray are completed.

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

PR: https://git.openjdk.java.net/jdk/pull/8441


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic