Just wondering why some component "shaking" when the mouse dragging the top window?


Hey guys,

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?

Thanks a lot!



Sorry - would need much more info before anyone could guess what you're seeing there or why it might be happening.


Awww my bad. Here's the thing: 


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?


Huh? Are they definitely child components of the window and not separate windows?


They are all child components of the top window.

Yesterday I found the problem is easy to tell on debug version,

on release version, the child components are move fast enough

so not everyone can tell. but if I look carefully I can still see the delay.

it happened more worse when a "heavy" or "big" window of other program on the back 

of my programs top window. (For example a window of photoshop ,chrome on the back)...

not sure maybe its just because my PC is not fast enough?

I can upload the test code~


It has nothing to do with speed. Are you perhaps using the GL rendering engine?


My operating system is Windows and I used Jucer to make the project. I kept the default settings about Graphics .


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...