Commit 44cfa3ec authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

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.
parent c8ec431f
......@@ -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},
};
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment