When closing the session file, reset WS_MAXIMIZE the window style
if the main window was maximized.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@196 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/rfbplayer/rfbplayer.cxx b/rfbplayer/rfbplayer.cxx
index ea8ebb3..c7826d1 100644
--- a/rfbplayer/rfbplayer.cxx
+++ b/rfbplayer/rfbplayer.cxx
@@ -939,6 +939,7 @@
 
 void RfbPlayer::closeSessionFile() {
   char speedStr[10];
+  DWORD dwStyle;
   RECT r;
 
   // Uncheck all toolbar buttons
@@ -967,6 +968,10 @@
   SendMessage(posTrackBar, TBM_SETRANGE, TRUE, MAKELONG(0, 0));
     
   // Change the player window size and frame size to default
+  if ((dwStyle = GetWindowLong(getMainHandle(), GWL_STYLE)) & WS_MAXIMIZE) {
+    dwStyle &= ~WS_MAXIMIZE;
+    SetWindowLong(getMainHandle(), GWL_STYLE, dwStyle);
+  }
   SetWindowPos(getMainHandle(), 0, 0, 0, 
     DEFAULT_PLAYER_WIDTH, DEFAULT_PLAYER_HEIGHT, 
     SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED);