mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-1770 [windows] frame does not open as maximized
(cherry picked from commit d9dfc3c6c5)
This commit is contained in:
committed by
alexey.ushakov@jetbrains.com
parent
7ef07622ed
commit
ae5553a7fe
@@ -1419,6 +1419,16 @@ void AwtFrame::_SetState(void *param)
|
||||
|
||||
f->setIconic(iconify);
|
||||
f->setZoomed(zoom);
|
||||
|
||||
// [tav] With custom decor enabled, MS Win will send WM_SIZE msg w/o SIZE_MAXIMIZED param set
|
||||
// before the frame will be shown. The msg handler will drop the maximized state in response.
|
||||
// In order to prevent that, we set the maximized state on the native frame in advance.
|
||||
if (zoom && f->HasCustomDecoration()) {
|
||||
WINDOWPLACEMENT wp;
|
||||
::GetWindowPlacement(f->GetHWnd(), &wp);
|
||||
wp.showCmd = SW_SHOWMAXIMIZED;
|
||||
::SetWindowPlacement(f->GetHWnd(), &wp);
|
||||
}
|
||||
}
|
||||
}
|
||||
ret:
|
||||
|
||||
Reference in New Issue
Block a user