On Wed, 1 Jul 2026 07:43:49 GMT, Matthias Baesken <[email protected]> wrote:

>> The IS_WIN2000 macro checks for Windows major version number >= 5, see 
>> https://github.com/search?q=repo%3Aopenjdk%2Fjdk%20IS_WIN2000&type=code
>> but we run for a long time on much higher Windows versions as a minimum.
>> So the check is obsolete. Same is true for the IS_WINXP check.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Matthias Baesken has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Remove additional defines of COLOR_MENUBAR

Looks good to me.

Further clean-up is possible.

There seems to be a bug in `awt_DesktopProperties.cpp`.

src/java.desktop/windows/native/libawt/windows/ComCtl32Util.cpp line 56:

> 54: 
> 55: LRESULT ComCtl32Util::DefWindowProc(WNDPROC _DefWindowProc, HWND hwnd, 
> UINT msg, WPARAM wParam, LPARAM lParam) {
> 56:     return ::DefSubclassProc(hwnd, msg, wParam, lParam);

For future clean-up: the `_DefWindowProc` parameter is never used now.

src/java.desktop/windows/native/libawt/windows/awt_DesktopProperties.cpp line 
442:

> 440:         if (!settingsChanged && fontSmoothingType == 
> FONTSMOOTHING_STANDARD) {
> 441:             /* No need to check any LCD specific settings */
> 442:             return;

It looks to me the condition should've been


Suggestion:

        if (!settingsChanged || fontSmoothingType == FONTSMOOTHING_STANDARD) {
            /* No need to check any LCD specific settings */
            return;


That is we get into this early exist branch if nothing's changed or if new font 
smoothing is `FONTSMOOTHING_STANDARD` (non-LCD).

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

Marked as reviewed by aivanov (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/31676#pullrequestreview-4617613439
PR Review Comment: https://git.openjdk.org/jdk/pull/31676#discussion_r3513219892
PR Review Comment: https://git.openjdk.org/jdk/pull/31676#discussion_r3513169363

Reply via email to