From 7153218b086fa670e5a1729583f386a5a64f7617 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 11 Apr 2021 09:55:21 +0100 Subject: [PATCH] Fix a mismatch of GetWindowLong with GWLP_*. In commit bb59f27386dae8f I changed a use of the constant GWL_ID to GWLP_ID, on the grounds that the former caused a build failure under winelib. But the GWLP constants are supposed to be used with GetWindowLongPtr, and I was still calling GetWindowLong. (Benign, since the two sets of constants are the same. But that is the only case in the whole code base where I'd made that error, and since it was only introduced a couple of days ago, there's no possibility of a longstanding historical reason for carefully not touching it!) --- windows/windlg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/windlg.c b/windows/windlg.c index 6c5cc508..9c5fdb76 100644 --- a/windows/windlg.c +++ b/windows/windlg.c @@ -923,7 +923,7 @@ static INT_PTR CALLBACK HostKeyDialogProc(HWND hwnd, UINT msg, HDC hdc = (HDC)wParam; HWND control = (HWND)lParam; - if (GetWindowLong(control, GWLP_ID) == IDC_HK_TITLE) { + if (GetWindowLongPtr(control, GWLP_ID) == IDC_HK_TITLE) { SetBkMode(hdc, TRANSPARENT); HFONT prev_font = (HFONT)SelectObject( hdc, (HFONT)GetStockObject(SYSTEM_FONT));