Use SHOW command instead of SHOWNORMAL when making a window visible, since SHOWNORMAL will un-maximize a fullscreen or maximized window.

Do not force an invisible window to become visible when modifying its state or borders.
This commit is contained in:
the_fiddler 2009-11-07 10:44:31 +00:00
parent dd832ab6bd
commit 874401ce0b

View file

@ -810,7 +810,7 @@ namespace OpenTK.Platform.Windows
{
if (value)
{
Functions.ShowWindow(window.WindowHandle, ShowWindowCommand.SHOWNORMAL);
Functions.ShowWindow(window.WindowHandle, ShowWindowCommand.SHOW);
}
else if (!value)
{
@ -989,7 +989,11 @@ namespace OpenTK.Platform.Windows
SetWindowPosFlags.NOMOVE | SetWindowPosFlags.NOZORDER |
SetWindowPosFlags.FRAMECHANGED);
Visible = true;
// Force window to redraw update its borders, but only if it's
// already visible (invisible windows will change borders when
// they become visible, so no need to make them visiable prematurely).
if (Visible)
Visible = true;
WindowState = state;