Main Window does not repaint until it has grabbed the focus

Hi,
The main Window does not repaint until it has grabbed the focus!
In Wafeform you can detach the Midi Editor putting it in a DocumentWindow.
I’m trying to do the same thing but when i change something in the component handled by the document window , the main window does not repaint until it grabs the focus…
In Wafeform even if the main window has not grab the focus it repaints it’s components properly.
How to deal with it ?
Thanks.