]> source.dussan.org Git - tigervnc.git/commitdiff
When closing the session file, reset WS_MAXIMIZE the window style
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Sat, 19 Feb 2005 13:17:58 +0000 (13:17 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Sat, 19 Feb 2005 13:17:58 +0000 (13:17 +0000)
if the main window was maximized.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@196 3789f03b-4d11-0410-bbf8-ca57d06f2519

rfbplayer/rfbplayer.cxx

index ea8ebb326d19219606f511fad384c2cbed5ee38b..c7826d135b2f548775e526b83c4e509112a169a1 100644 (file)
@@ -939,6 +939,7 @@ long RfbPlayer::calculateSessionTime(char *filename) {
 
 void RfbPlayer::closeSessionFile() {
   char speedStr[10];
+  DWORD dwStyle;
   RECT r;
 
   // Uncheck all toolbar buttons
@@ -967,6 +968,10 @@ void RfbPlayer::closeSessionFile() {
   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);