Start playing if autoplay set to TRUE.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@100 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/rfbplayer/rfbplayer.cxx b/rfbplayer/rfbplayer.cxx
index e2d0200..d8453af 100644
--- a/rfbplayer/rfbplayer.cxx
+++ b/rfbplayer/rfbplayer.cxx
@@ -203,7 +203,7 @@
   // Create the main window
   const TCHAR* name = _T("RfbPlayer");
   mainHwnd = CreateWindow((const TCHAR*)baseClass.classAtom, name, WS_OVERLAPPEDWINDOW,
-    0, 0, 10, 10, 0, 0, baseClass.instance, this);
+    0, 0, 640, 480, 0, 0, baseClass.instance, this);
   if (!mainHwnd) {
     throw rdr::SystemException("unable to create WMNotifier window instance", GetLastError());
   }
@@ -211,6 +211,7 @@
 
   // Create the backing buffer
   buffer = new win32::DIBSectionBuffer(getFrameHandle());
+  setVisible(true);
 }
 
 RfbPlayer::~RfbPlayer() {
@@ -575,7 +576,6 @@
 
   // Set the window title and show it
   setTitle(cp.name());
-  setVisible(true);
 
   // Set the player's param
   applyOptions();
@@ -850,7 +850,7 @@
   try {
     player = new RfbPlayer(fileName, initTime, playbackSpeed, autoplay, 
                            showControls, acceptBell);
-    player->start();
+    if (autoplay) player->start();
   } catch (rdr::Exception e) {
     MessageBox(NULL, e.str(), e.type(), MB_OK | MB_ICONERROR);
     delete player;