Skip to content

Commit

Permalink
call remove_wndproc on child windows too (otya128#1285)
Browse files Browse the repository at this point in the history
  • Loading branch information
cracyc authored Mar 25, 2023
1 parent ceb92fb commit d33cd50
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions user/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ BOOL CALLBACK remove_wndproc(HWND hwnd, LPARAM lparam)
{
if (GetExePtr(GetWindowWord16(HWND_16(hwnd), GWL_HINSTANCE)) == lparam)
{
TRACE("HWND %p WNDPROC removed\n");
TRACE("HWND %x WNDPROC removed\n", hwnd);
EnumChildWindows(hwnd, remove_wndproc, lparam);
SetWindowLongPtrA(hwnd, GWLP_WNDPROC, DefWindowProcA);
}
return TRUE;
Expand All @@ -132,10 +133,10 @@ BOOL CALLBACK enum_thread_window(HWND hwnd, LPARAM lparam)
{
if (GetWindowLongPtrA(hwnd, GWLP_WNDPROC) != DefWindowProcA)
{
TRACE("HWND %p WNDPROC removed\n");
TRACE("HWND %x WNDPROC removed\n", hwnd);
SetWindowLongPtrA(hwnd, GWLP_WNDPROC, DefWindowProcA);
}
TRACE("HWND %p destroyed\n");
TRACE("HWND %x destroyed\n", hwnd);
DestroyWindow(hwnd);
}
return TRUE;
Expand Down

0 comments on commit d33cd50

Please sign in to comment.