+fix: initial factory window position

This commit is contained in:
rkotten 2021-09-13 11:24:06 +02:00
parent 4bc45c006f
commit 25e03008cc
2 changed files with 5 additions and 2 deletions

View File

@ -4431,8 +4431,8 @@ WININFO GetMyWindowPlacement(HWND hwnd, MONITORINFO *hMonitorInfo, const int off
wi.y = wndpl.rcNormalPosition.top + offset;
wi.cx = wndpl.rcNormalPosition.right - wndpl.rcNormalPosition.left;
wi.cy = wndpl.rcNormalPosition.bottom - wndpl.rcNormalPosition.top;
wi.max = IsZoomed(hwnd) || (wndpl.flags & WPF_RESTORETOMAXIMIZED);
wi.zoom = SciCall_GetZoom();
wi.max = (hwnd ? IsZoomed(hwnd) : false) || (wndpl.flags & WPF_RESTORETOMAXIMIZED);
wi.zoom = hwnd ? SciCall_GetZoom() : 100;
wi.dpi = Scintilla_GetWindowDPI(hwnd);
if (Settings2.LaunchInstanceFullVisible) {

View File

@ -754,6 +754,8 @@ static void _InitGlobals()
FileWatching.flagChangeNotify = FWM_DONT_CARE;
FileWatching.FileWatchingMode = FWM_DONT_CARE;
FileWatching.MonitoringLog = false;
g_IniWinInfo = GetFactoryDefaultWndPos(2);
}
@ -1452,6 +1454,7 @@ HWND InitInstance(const HINSTANCE hInstance, LPCWSTR pszCmdLine, int nCmdShow)
hInstance,
NULL);
g_IniWinInfo.dpi = Scintilla_GetWindowDPI(hwndMain); // correct dpi
SnapToWinInfoPos(hwndMain, g_IniWinInfo, SCR_NORMAL);
if (g_IniWinInfo.max) {