Use new vnc syntax (with a colon).
[qemu-gui.git] / vncdisplaythread.cpp
blob6695e650b0be70a53a85d5eaf623f650f6c0a834
1 #include "vncdisplaythread.h"
2 #include "vncpanel.h"
4 /* inline */ VNCDisplayThread::VNCDisplayThread(VNCPanel *panel)
5 :wxThread(wxTHREAD_JOINABLE),
6 panel(panel),
7 running(true){}
9 /* inline */ void VNCDisplayThread::Stop() { running = false; }
11 void *VNCDisplayThread::Entry() {
12 rfbClient *cl = panel->GetVNCClient();
13 wxCriticalSection& lock = panel->GetCriticalSection();
14 if(!cl)
15 return NULL;
17 // while we're still going
18 while(running){
19 int i = WaitForMessage(cl,10000);
20 if(i<0)
21 return NULL;
22 if(i){
23 //lock.Enter();
24 wxMutexGuiEnter();
25 if(!HandleRFBServerMessage(cl)){
26 //lock.Leave();
27 wxMutexGuiLeave();
28 return NULL;
30 //lock.Leave();
31 wxMutexGuiLeave();
35 return NULL;