I made a program using juce. There are some components keep calling repaint() based on timerCallback(). And when I use mouse dragging the top window, the components are "shaking".
Can't figure out why this happened. Any suggestions please?
I got 30 components and a Timer in my program. When the timer does timerCallback() (every 20ms), all these components repaint() themselves. A TopWindows owns all these components. When I drag the TopWindow to some place, the components still stay in place for a little while, and then move to the right place. But once I stop the Timer, the problem solves. I'm wondering is there any function callback can let me know that the TopWindow are doing mouse dragging so that I can stop TimerCallback?
Then I really don't know! The whole window always gets drawn with a single double-buffered operation, and I've never seen anything like this. Which version of Windows?
To be honest, I've seen similar stuff when resizing components (Win 7 x64), and I too have a hard time understanding why, because as you say, the window is double-buffered so this shouldn't be able to be happening...