In my app the user can resize a TreeView horizontally by dragging the mouse on some resizer. On Mac, when I move the mouse really fast from left to right, the content of the TreeView seems not to be repainted correctly.
Example: TreeView is 100 pixels width. I resize it very fast to 500 pixels width and the contents of the TreeView still stay 100 pixels wide. The vertical scrollbar of the TreeView is repositioned correctly. When I move the mouse slowly there is now problem.
When I modify TreeView a little bit like this, then it all works.
How bizarre… But I’m not sure I trust your fix, because it must depend on the order of repaint and update messages in the message queue being in the right order - how about this instead: