From 16ab381f2822efa3cfc071cb073bcfe7991fda91 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Fri, 4 May 2018 09:07:25 +0200 Subject: [PATCH] + fix: force initial default position only if no window position is specified --- src/Notepad3.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Notepad3.c b/src/Notepad3.c index 7d1db8c6a..17f6c7b46 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -516,7 +516,7 @@ static int g_flagRelativeFileMRU = 0; static int g_flagPortableMyDocs = 0; static int g_flagToolbarLook = 0; static int g_flagPosParam = 0; -static int g_flagDefaultPos = 2; // default window position +static int g_flagDefaultPos = 0; static int g_flagNewFromClipboard = 0; static int g_flagPasteBoard = 0; static int g_flagSetEncoding = 0; @@ -6518,6 +6518,13 @@ void LoadSettings() g_WinInfo.cy = IniSectionGetInt(pIniSection,tchSizeY,CW_USEDEFAULT); g_WinInfo.max = IniSectionGetInt(pIniSection,tchMaximized,0); if (g_WinInfo.max) g_WinInfo.max = 1; + + if (((g_WinInfo.x & ~CW_USEDEFAULT) == 0) || + ((g_WinInfo.y & ~CW_USEDEFAULT) == 0) || + ((g_WinInfo.cx & ~CW_USEDEFAULT) == 0) || + ((g_WinInfo.cy & ~CW_USEDEFAULT) == 0)) { + g_flagDefaultPos = 2; + } } // --- override by resolution specific settings ---