Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8321151

JDK-8294427 breaks Windows L&F on all older Windows versions

    XMLWordPrintable

Details

    • b04
    • 22
    • b04

    Backports

      Description

        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.


        To reproduce the bug, start SwingSet2, then under the “Look & Feel” menu click “Windows Style Look & Feel”. Any other Swing application in Windows Look & Feel can be used to reproduce the bug.

        Attachments

          Issue Links

            Activity

              People

                rmahajan Rajat Mahajan
                prr Philip Race
                Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: