From 0bdb28422e4c19c3f9e540ff8deb2fc9768462ab Mon Sep 17 00:00:00 2001 From: george82 Date: Sat, 19 Feb 2005 13:17:58 +0000 Subject: [PATCH] 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 --- rfbplayer/rfbplayer.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rfbplayer/rfbplayer.cxx b/rfbplayer/rfbplayer.cxx index ea8ebb32..c7826d13 100644 --- a/rfbplayer/rfbplayer.cxx +++ b/rfbplayer/rfbplayer.cxx @@ -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); -- 2.39.5