From 90762bbddad6703fd60c51dbd5ecede22d1c7d06 Mon Sep 17 00:00:00 2001 From: ozone10 Date: Tue, 18 Jun 2024 17:50:03 +0200 Subject: [PATCH] Fix a regression due to usage of double buffer Regression introduced in https://github.com/notepad-plus-plus/notepad-plus-plus/commit/5b36e097c21770a687afc3c1bd978cce26769f7c ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/15296#issuecomment-2171221062 Replace WM_PRINTCLIENT with WM_PRINT to avoid black parts when resizing tabbar in light mode. Close #15319 --- PowerEditor/src/WinControls/TabBar/TabBar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.cpp b/PowerEditor/src/WinControls/TabBar/TabBar.cpp index cac48ddeb..7874a9f20 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.cpp +++ b/PowerEditor/src/WinControls/TabBar/TabBar.cpp @@ -966,8 +966,8 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara { // Even if the tab bar common control is used directly, e.g. in non-dark mode, // it suffers from flickering during updates, so let it paint into a back buffer - ::CallWindowProc(_tabBarDefaultProc, hwnd, WM_ERASEBKGND, reinterpret_cast(hdc), 0); - ::CallWindowProc(_tabBarDefaultProc, hwnd, WM_PRINTCLIENT, reinterpret_cast(hdc), PRF_NONCLIENT | PRF_CLIENT); + ::DefWindowProc(hwnd, WM_ERASEBKGND, reinterpret_cast(hdc), 0); + ::DefWindowProc(hwnd, WM_PRINT, reinterpret_cast(hdc), PRF_NONCLIENT | PRF_CLIENT); _dblBuf.endPaint(hwnd, &ps); return 0; }