Skip to content

Commit

Permalink
Restore the window size in WM_CREATE, before calling the client handler
Browse files Browse the repository at this point in the history
This fixes an issue with centering the images in TortoiseIDiff on start.

Based on TortoiseSVN rev. 26912.

Signed-off-by: Sven Strickroth <[email protected]>
  • Loading branch information
csware committed Oct 16, 2015
1 parent 6c9a3f9 commit c8eb4af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Utils/MiscUI/BaseWindow.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// TortoiseGit - a Windows shell extension for easy version control

// Copyright (C) 2003-2009, 2012-2013 - TortoiseSVN
// Copyright (C) 2003-2009, 2012-2013, 2015 - TortoiseSVN

// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -83,8 +83,8 @@ LRESULT CALLBACK CWindow::stWinMsgHandler(HWND hwnd, UINT uMsg, WPARAM wParam, L
{
switch (uMsg)
{
case WM_ACTIVATE:
if ((wParam == WA_ACTIVE) && (!pWnd->bWindowRestored) && (!pWnd->sRegistryPath.empty()))
case WM_CREATE:
if ((!pWnd->bWindowRestored) && (!pWnd->sRegistryPath.empty()))
{
WINDOWPLACEMENT wpl = {0};
DWORD size = sizeof(wpl);
Expand Down

0 comments on commit c8eb4af

Please sign in to comment.