On Fri, 10 Jul 2026 10:59:52 GMT, Alexey Ivanov <[email protected]> wrote:

>> [JDK-8387298](https://bugs.openjdk.org/browse/JDK-8387298) removed the 
>> IS_WINXP macro, and the updated code in ComCtl32Util::UnsubclassHWND and 
>> ComCtl32Util::DefWindowProc doesn't use the _DefWindowProc parameter any 
>> more.
>> 
>> Thus, the _DefWindowProc parameter can be removed from these functions.
>> 
>> Removing these parameters requires updating all the usages of the functions, 
>> for example, in awt_Component.cpp, awt_Choice.cpp...
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/java.desktop/windows/native/libawt/windows/awt_FileDialog.cpp line 115:
> 
>> 113:     }
>> 114: 
>> 115:     WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hWnd, 
>> NativeDialogWndProcProp));
> 
> The corresponding `::SetProp` at line 157 should also be removed.
> 
> https://github.com/openjdk/jdk/blob/978dfecb6545166aee93a8e68c9c82535b0cb3e2/src/java.desktop/windows/native/libawt/windows/awt_FileDialog.cpp#L155-L157
> 
> Also, `::RemoveProp` for `NativeDialogWndProcProp` is to be removed:
> 
> https://github.com/openjdk/jdk/blob/978dfecb6545166aee93a8e68c9c82535b0cb3e2/src/java.desktop/windows/native/libawt/windows/awt_FileDialog.cpp#L175
> 
> ---
> 
> `SubclassHWND` always returns `NULL`.
> 
> https://github.com/openjdk/jdk/blob/978dfecb6545166aee93a8e68c9c82535b0cb3e2/src/java.desktop/windows/native/libawt/windows/ComCtl32Util.cpp#L44-L47
> 
> Removing the return value from `SubclassHWND` is a candidate for another 
> cleanup? Or it could be included in this PR.

The property name itself, `NativeDialogWndProcProp`, could be removed if it's 
not used after this PR, which should be the case.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31814#discussion_r3558403783

Reply via email to