From: Zhiyi Zhang zzhang@codeweavers.com
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},