Integrated: JDK-8305645: System Tray icons get corrupted when Windows primary monitor changes
Harshitha Onkar
honkar at openjdk.org
Fri Jun 9 16:14:50 UTC 2023
On Wed, 7 Jun 2023 19:05:56 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
> There are two scenarios related to tray icon distortion.
>
> 1. Single Screen - when DPI / Scale is changed on the fly - this was resolved as part of [PR#8441](https://github.com/openjdk/jdk/pull/8441)
>
> 2. Multi Screen - when screens are set to different scales and the primary display is toggled. This is a variation of scenario one.
>
> Earlier Windows msg - [WM_DPICHANGED](https://learn.microsoft.com/en-us/windows/win32/hidpi/wm-dpichanged) was used to set `m_bDPIChanged` which is used within `AwtTrayIcon::WmTaskbarCreated()` to update the tray icons. This message is sent when window DPI changes. WM_DPICHANGED msg is not received when taskbar switches to primary display under multiple screen scenario, hence the tray icon was still seen distorted in case 2.
>
> As [WM_DISPLAYCHANGE](https://learn.microsoft.com/en-us/windows/win32/gdi/wm-displaychange) is received in both cases, it is used as the new message to update `m_bDPIChanged`. This message also works when the main display monitor gets disconnected accidently making the other display the primary display.
>
> TrayIconScalingTest's instructions have been updated to include both the cases described above.
This pull request has now been integrated.
Changeset: 6cd370e0
Author: Harshitha Onkar <honkar at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/6cd370e04b01c3033eb439de0f38e9b6d703c6f4
Stats: 16 lines in 2 files changed: 7 ins; 0 del; 9 mod
8305645: System Tray icons get corrupted when Windows primary monitor changes
Reviewed-by: serb, aivanov
-------------
PR: https://git.openjdk.org/jdk/pull/14368
More information about the client-libs-dev
mailing list