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

List:       openjdk-2d-dev
Subject:    Re: RFR: 8321151: JDK-8294427 breaks Windows L&F on all older Windows versions
From:       Alisen Chung <achung () openjdk ! org>
Date:       2023-12-21 19:31:48
Message-ID: xOsiu-gK51OiJ9gUjD6C63VbZ8Xibc-1MEqi6_qllBY=.dec5c68c-9587-4188-9cc4-958126616e9f () github ! com
[Download RAW message or body]

On Thu, 21 Dec 2023 01:19:40 GMT, Rajat Mahajan <rmahajan@openjdk.org> wrote:

> **Issue:**
> https://bugs.openjdk.org/browse/JDK-8294427 starts to use this API
> https://learn.microsoft.com/en-us/windows/win32/api/uxtheme/nf-uxtheme-openthemedatafordpi
>  
> which was introduced only in Windows 10 1703.
> So the theming engine won't load on anything earlier like the original windows 10 \
> or windows 8.1 etc. 
> So as an undocumented side-effect it completely breaks the theming of Windows L&F \
> on anything earlier and it falls back to hard-coded rendering like Windows \
> NT/Windows 2000 
> Whilst those older versions are technically out of at least "mainstream" support, \
> this is not the way to make that breaking change and I see this fix has been \
> backported to older releases which expect stability 
> it seems to me that this code should NOT fail if the new API is missing and instead \
> fall back to the old code. No one will care about a pixel being off on hi-dpi if \
> the entire UI is wrong. 
> **Fix:**
> Added fallback path to support older versions of Windows that do not support \
> OpenThemeDataForDpi(). 
> **Testing:**
> Tested on my Windows 10 machine with and without the fallback path and it works as \
> expected. Alexey tested on Windows 7 and on Windows 10 v1607 — it works correctly \
> (jdk 21.0.2 can't render themes as reported). He also tested on Windows 11 .

Looks fine

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

Marked as reviewed by achung (Committer).

PR Review: https://git.openjdk.org/jdk/pull/17173#pullrequestreview-1793550645


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

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