mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 10:47:18 +00:00
comctl32: Skip restoring window proc if it has been modified.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43073
This commit is contained in:
parent
8387d2feff
commit
078c6e5ab2
|
@ -1243,7 +1243,9 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u
|
||||||
if (!stack->SubclassProcs && !stack->running) {
|
if (!stack->SubclassProcs && !stack->running) {
|
||||||
TRACE("Last Subclass removed, cleaning up\n");
|
TRACE("Last Subclass removed, cleaning up\n");
|
||||||
/* clean up our heap and reset the original window procedure */
|
/* clean up our heap and reset the original window procedure */
|
||||||
if (stack->is_unicode)
|
if ((WNDPROC)GetWindowLongPtrW (hWnd, GWLP_WNDPROC) != COMCTL32_SubclassProc)
|
||||||
|
WARN("Window procedure has been modified, skipping restore\n");
|
||||||
|
else if (stack->is_unicode)
|
||||||
SetWindowLongPtrW (hWnd, GWLP_WNDPROC, (DWORD_PTR)stack->origproc);
|
SetWindowLongPtrW (hWnd, GWLP_WNDPROC, (DWORD_PTR)stack->origproc);
|
||||||
else
|
else
|
||||||
SetWindowLongPtrA (hWnd, GWLP_WNDPROC, (DWORD_PTR)stack->origproc);
|
SetWindowLongPtrA (hWnd, GWLP_WNDPROC, (DWORD_PTR)stack->origproc);
|
||||||
|
|
|
@ -192,7 +192,7 @@ static void check_unicode_(int line, HWND hwnd, DWORD flags)
|
||||||
else if (flags & EXPECT_WNDPROC_1)
|
else if (flags & EXPECT_WNDPROC_1)
|
||||||
ok_(__FILE__, line)(proc == wnd_proc_1, "got proc %p\n", proc);
|
ok_(__FILE__, line)(proc == wnd_proc_1, "got proc %p\n", proc);
|
||||||
else if (flags & EXPECT_WNDPROC_3)
|
else if (flags & EXPECT_WNDPROC_3)
|
||||||
todo_wine_if(proc == wnd_proc_1) ok_(__FILE__, line)(proc == wnd_proc_3, "got proc %p\n", proc);
|
ok_(__FILE__, line)(proc == wnd_proc_3, "got proc %p\n", proc);
|
||||||
else
|
else
|
||||||
ok_(__FILE__, line)(!IS_WNDPROC_HANDLE(proc), "got proc %p\n", proc);
|
ok_(__FILE__, line)(!IS_WNDPROC_HANDLE(proc), "got proc %p\n", proc);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue