Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OpenGL Win32 window ignoring "hidden" parameter #436

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions RenderSystems/GL3Plus/src/windowing/win32/OgreWin32Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ namespace Ogre
int left = -1; // Defaults to screen center
int top = -1; // Defaults to screen center
HWND parentHwnd = 0;
bool hidden = false;
String border;
bool outerSize = false;
mHwGamma = false;
Expand Down Expand Up @@ -171,7 +170,7 @@ namespace Ogre
mVSync = StringConverter::parseBool( opt->second );
opt = miscParams->find( "hidden" );
if( opt != end )
hidden = StringConverter::parseBool( opt->second );
mHidden = StringConverter::parseBool( opt->second );
opt = miscParams->find( "vsyncInterval" );
if( opt != end )
mVSyncInterval = StringConverter::parseUnsignedInt( opt->second );
Expand Down Expand Up @@ -320,8 +319,8 @@ namespace Ogre
strcpy( mDeviceName, monitorInfoEx.szDevice );

// Update window style flags.
mFullscreenWinStyle = ( hidden ? 0 : WS_VISIBLE ) | WS_CLIPCHILDREN | WS_POPUP;
mWindowedWinStyle = ( hidden ? 0 : WS_VISIBLE ) | WS_CLIPCHILDREN;
mFullscreenWinStyle = ( mHidden ? 0 : WS_VISIBLE ) | WS_CLIPCHILDREN | WS_POPUP;
mWindowedWinStyle = ( mHidden ? 0 : WS_VISIBLE ) | WS_CLIPCHILDREN;

if( parentHwnd )
{
Expand Down Expand Up @@ -679,8 +678,6 @@ namespace Ogre
mTexture->_transitionTo( GpuResidency::Resident, (uint8 *)0 );
if( mDepthBuffer )
mDepthBuffer->_transitionTo( GpuResidency::Resident, (uint8 *)0 );

setHidden( mHidden );
}
//-----------------------------------------------------------------------------------
void Win32Window::destroy()
Expand Down
Loading