On Fri, 17 Jul 2026 21:48:54 GMT, Phil Race <[email protected]> wrote:
>> Matthias Baesken has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - DefWindowProc related comment removed
>> - Remove NativeDialogWndProcProp
>
> src/java.desktop/windows/native/libawt/windows/awt_Choice.cpp line 101:
>
>> 99: void AwtChoice::Dispose() {
>> 100: if (m_hList != NULL) {
>> 101: ComCtl32Util::GetInstance().UnsubclassHWND(m_hList,
>> ListWindowProc);
>
> Is this call even needed any more ?
> And is m_listDefWindowProc needed any more ?
>
> SFAICS it was assigned via a call to
> ComCtl32Util::GetInstance().SubclassHWND(m_hList, ListWindowProc);
>
> and this UnSubclassHWND() call is to remove it .. so perhaps both can go.
>
> And maybe some of the other cases are the same.
>
> But it needs to be understood and a bunch of testing done.
>
> I think this PR is getting a bit more complex than you may have expected.
Hi Phil, good point!
>From what I see
https://github.com/search?q=repo%3Aopenjdk%2Fjdk%20m_listDefWindowProc&type=code
after this PR, only the declaration of `WNDPROC m_listDefWindowProc;`
(awt_Choice.h) and 2 assignments (awt_Choice.cpp) are left
`m_listDefWindowProc = NULL;` and `m_listDefWindowProc =
ComCtl32Util::GetInstance().SubclassHWND(m_hList, ListWindowProc);` .
So we only write/assign the variable but never use it after this PR.
Should I remove it too in this PR ?
Btw. wondering why we get no compiler warning because of the variable
`m_listDefWindowProc` now?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31814#discussion_r3612543171