On Tue, 30 Jun 2026 14:57:31 GMT, Matthias Baesken <[email protected]> wrote:

>> src/java.desktop/windows/native/libawt/windows/awt_DesktopProperties.cpp 
>> line 523:
>> 
>>> 521:     SetColorProperty(TEXT("win.menu.textColor"), 
>>> GetSysColor(COLOR_MENUTEXT));
>>> 522:     // COLOR_MENUBAR is only defined on WindowsXP. Our binaries are
>>> 523:     // built on NT, hence the below ifdef.
>> 
>> Overall looks good to me, with one caveat: these two lines document the 
>> `ifndef` below, so we should probably either remove both the comment and the 
>> `ifndef`, or keep them both. If the comment is accurate, all 5 lines should 
>> be deletable, but I can't confirm one way or the other from my own personal 
>> knowledge...
>
> This docu 
> https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsyscolor
> says about COLOR_MENUBAR
> 'Windows 2000, Windows 10 or greater:  This value is not supported.'
> probably that's why we define it in the codebase.
> Regarding 'built on NT', I think we can remove this (maybe it was the case 20 
> or 25 years ago) ?

Yes, I think they're safe to delete now: both the comment and the `ifndef`.

Windows XP introduced visual styles, and the menu bar and pop-up menus have 
different background colors.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31676#discussion_r3499874763

Reply via email to