summaryrefslogtreecommitdiff
path: root/plugingui/plugingui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/plugingui.cc')
-rw-r--r--plugingui/plugingui.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc
index a4f99d7..4f16b34 100644
--- a/plugingui/plugingui.cc
+++ b/plugingui/plugingui.cc
@@ -188,6 +188,8 @@ void PluginGUI::stopThread()
void PluginGUI::handleMessage(Message *msg)
{
+ GUI::Painter p(window);// Make sure we only redraw buffer one time.
+
switch(msg->type()) {
case Message::LoadStatus:
{
@@ -248,14 +250,14 @@ void PluginGUI::thread_main()
msghandler.sendMessage(MSGRCV_ENGINE, msg);
}
- while(1) {
+ while(running) {
#ifdef WIN32
SleepEx(50, FALSE);
#else
usleep(50000);
#endif/*WIN32*/
- if(!running) break;
+ // DEBUG(gui, "loop");
window->eventHandler()->processEvents();
handleMessages();