RFR: JDK-8255439: System Tray icons get corrupted when windows scaling changes [v3]

Alexey Ivanov aivanov at openjdk.java.net
Wed May 11 13:11:49 UTC 2022


On Tue, 10 May 2022 17:43:51 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   formatting changes
>
> Unfortunately, the icon is distorted on Windows 11. When I tested on Windows 10, it updates correctly most of the time, but rarely the icon becomes distorted. When the icon is distorted, enabling taskbar auto-hide and disabling it repaints the icon correctly; this works both on Windows 10 and 11.
> 
> ![Tray Icon 125% -> 150%](https://user-images.githubusercontent.com/70774172/167689269-2d41884a-a5cd-4cb5-b3b5-21b02f0f46b5.png)
> I got the above image on Windows 10 after switching from 125% to 150%. The icon should display 24 at 150%, one can see the number with some paint artefacts.
> 
> I don't understand why it happens this way.

> @aivanov-jdk were both windows 10 and windows 11 using the same pipeline ? (meaning GDI or D3D). Otherwise on our side I'd expect all the same code path ..

Good question. The output from `WindowsFlags` is the same on both machines:

WindowsFlags (Java):
  d3dEnabled: true
  d3dSet: false
  oglEnabled: false
  oglVerbose: false
  gdiBlitEnabled: true
  offscreenSharingEnabled: false

Setting `-Dsun.java2d.d3d=True` produces

Direct3D pipeline enabled on screen 0

in both cases.

Disabling Direct3D with `-Dsun.java2d.d3d=false` changes nothing.

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

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



More information about the client-libs-dev mailing list