mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
Merge pull request #3654 from RaiKoHoff/Dev_RC
Fix initial factory window position
This commit is contained in:
commit
f8f9e254ba
@ -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) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user