Module: wine Branch: master Commit: 480598680ceb86661bd269b7a64bd90e38a40f98 URL: https://gitlab.winehq.org/wine/wine/-/commit/480598680ceb86661bd269b7a64bd90...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Mon Jan 1 18:04:44 2024 +0800
comctl32/syslink: Don't delete font when destroying the control.
The font set by WM_SETFONT is not owned by syslink so it shouldn't be deleted when handling WM_DESTROY for the control.
Fix Toad for Oracle text gets reset to the system font after installing Team Coding. The application creates a font and set it to a syslink. Then after the syslink destroys itself, the font becomes invalid so other controls using the font end up falling back to the system font.
---
dlls/comctl32/syslink.c | 1 - dlls/comctl32/tests/misc.c | 1 - 2 files changed, 2 deletions(-)
diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index 6af516ea1e6..f5a70e982c3 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -1711,7 +1711,6 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message, case WM_DESTROY: TRACE("SysLink Ctrl destruction, hwnd=%p\n", hwnd); SYSLINK_ClearDoc(infoPtr); - if(infoPtr->Font != 0) DeleteObject(infoPtr->Font); if(infoPtr->LinkFont != 0) DeleteObject(infoPtr->LinkFont); SetWindowLongPtrW(hwnd, 0, 0); Free (infoPtr); diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c index e5ac43a7ae0..c57f4581a4b 100644 --- a/dlls/comctl32/tests/misc.c +++ b/dlls/comctl32/tests/misc.c @@ -1246,7 +1246,6 @@ static void test_WM_SETFONT(void) } else { - todo_wine_if(!lstrcmpA(tests[i].class_name, "SysLink")) ok(ret == sizeof(lf), "GetObjectA failed, error %lu.\n", GetLastError()); }