Added some temporary icons to the repository
[qemu-gui.git] / vncdisplaythread.cpp
blob9c7b059c661bcb5e743a31f6591bae7f98b94932
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 if(!cl)
14 return NULL;
16 while(running){
17 int i = WaitForMessage(cl,500);
18 if(i<0)
19 return NULL;
20 if(i){
21 wxMutexGuiEnter();
22 if(!HandleRFBServerMessage(cl)){
23 wxMutexGuiLeave();
24 return NULL;
26 wxMutexGuiLeave();
30 return NULL;