comctl32/treeview: Don't repaint when handling WM_STYLECHANGED.

Some applications subclass treeview 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.
This commit is contained in:
Zhiyi Zhang 2022-10-17 15:36:43 +08:00 committed by Alexandre Julliard
parent c8ec431fd4
commit 44cfa3ec1a
2 changed files with 1 additions and 2 deletions

View file

@ -1109,7 +1109,7 @@ static void test_WM_STYLECHANGED(void)
{TOOLBARCLASSNAMEA, wm_stylechanged_seq},
{TOOLTIPS_CLASSA, wm_stylechanged_seq},
{TRACKBAR_CLASSA, wm_stylechanged_trackbar_seq, TRUE},
{WC_TREEVIEWA, wm_stylechanged_seq, TRUE},
{WC_TREEVIEWA, wm_stylechanged_seq},
{UPDOWN_CLASSA, wm_stylechanged_seq, TRUE},
{WC_SCROLLBARA, wm_stylechanged_seq},
};

View file

@ -5627,7 +5627,6 @@ TREEVIEW_StyleChanged(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
TREEVIEW_EndEditLabelNow(infoPtr, TRUE);
TREEVIEW_UpdateSubTree(infoPtr, infoPtr->root);
TREEVIEW_UpdateScrollBars(infoPtr);
TREEVIEW_Invalidate(infoPtr, NULL);
return 0;
}