summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-10-01 17:20:39 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-10-01 17:20:39 +0200
commit8b58bbab8ee810d99d7e2653f7d86fc8dd3f48d6 (patch)
tree0ecb49344e8c80f2bb28f61d067405fbcc4fa953 /plugingui
parentd2898df7ef2efface44199067536f8b8749c0e7c (diff)
Make sure we redraw if GUI is changed by engine event.
Diffstat (limited to 'plugingui')
-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();