Module: wine Branch: master Commit: a8396d8b1e852276b6cea9f2c50834739d1170da URL: https://gitlab.winehq.org/wine/wine/-/commit/a8396d8b1e852276b6cea9f2c508347...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Mon Oct 17 16:06:09 2022 +0800
comctl32/listview: Don't repaint when handling WM_STYLECHANGED.
Some applications subclass listview and change style multiple times when painting. Invalidating control when handling WM_STYLECHANGED causes infinite WM_PAINT messages in this case and end up stalling the message queue.
---
dlls/comctl32/listview.c | 3 --- dlls/comctl32/tests/misc.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 38d43a9f742..d060fd5c977 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -11298,9 +11298,6 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, /* add scrollbars if needed */ LISTVIEW_UpdateScroll(infoPtr);
- /* invalidate client area + erase background */ - LISTVIEW_InvalidateList(infoPtr); - return 0; }
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c index 73526020843..d9f07570fd0 100644 --- a/dlls/comctl32/tests/misc.c +++ b/dlls/comctl32/tests/misc.c @@ -1096,7 +1096,7 @@ static void test_WM_STYLECHANGED(void) {HOTKEY_CLASSA, wm_stylechanged_seq}, {WC_IPADDRESSA, wm_stylechanged_seq}, {WC_LISTBOXA, wm_stylechanged_repaint_seq, TRUE}, - {WC_LISTVIEWA, wm_stylechanged_seq, TRUE}, + {WC_LISTVIEWA, wm_stylechanged_seq}, {MONTHCAL_CLASSA, wm_stylechanged_repaint_seq, TRUE}, {WC_NATIVEFONTCTLA, wm_stylechanged_seq}, {WC_PAGESCROLLERA, wm_stylechanged_pager_seq, TRUE},