Fixed a bug with the blanking frame window while the rewind is performing.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@229 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/rfbplayer/rfbplayer.cxx b/rfbplayer/rfbplayer.cxx
index d232461..e96cd39 100644
--- a/rfbplayer/rfbplayer.cxx
+++ b/rfbplayer/rfbplayer.cxx
@@ -226,7 +226,7 @@
   seekMode(false), fileName(_fileName), lastPos(0), timeStatic(0), 
   speedEdit(0), posTrackBar(0), speedUpDown(0), acceptBell(_acceptBell), 
   rfbReader(0), sessionTimeMs(0), sliderDraging(false), sliderStepMs(0), 
-  loopPlayback(false), imageDataStartTime(0) {
+  loopPlayback(false), imageDataStartTime(0), rewindFlag(false) {
 
   CTRL_BAR_HEIGHT = 28;
 
@@ -488,7 +488,7 @@
 
   case WM_PAINT:
     {
-      if (isSeeking()) {
+      if (isSeeking() || rewindFlag) {
         seekMode = true;
         return 0;
       } else {
@@ -826,10 +826,12 @@
     // It's a special exception to perform backward seeking.
     // We only rewind the stream and seek the offset
     if (strcmp(e.str(), "[REWIND]") == 0) {
+      rewindFlag = true; 
       long seekOffset = max(getSeekOffset(), imageDataStartTime);
       rewind();
       setPos(seekOffset);
       updatePos(seekOffset);
+      rewindFlag = false;
     } else {
       MessageBox(getMainHandle(), e.str(), e.type(), MB_OK | MB_ICONERROR);
       return;
diff --git a/rfbplayer/rfbplayer.h b/rfbplayer/rfbplayer.h
index dea26ec..5c82bc3 100644
--- a/rfbplayer/rfbplayer.h
+++ b/rfbplayer/rfbplayer.h
@@ -152,6 +152,10 @@
     // Returns true if part of the supplied rect is visible, false otherwise
     bool invalidateBufferRect(const Rect& crect);
 
+    // rewindFlag is a flag wich disable the update of the frame buffer window 
+    // while the rewind is performing.
+    bool rewindFlag;
+
     // Local window state
     HWND mainHwnd;
     HWND frameHwnd;