OSX: Only update the window level if it has changed
Updating the level could lead to windows being reordered in that level on some OS versions, so for safety don't do it unless it is needed.
This commit is contained in:
@@ -939,9 +939,13 @@ void wxNonOwnedWindowCocoaImpl::SetWindowStyleFlag( long style )
|
||||
level = NSModalPanelWindowLevel;
|
||||
else if (( style & wxFRAME_FLOAT_ON_PARENT ) || ( style & wxFRAME_TOOL_WINDOW ))
|
||||
level = NSFloatingWindowLevel;
|
||||
|
||||
[m_macWindow setLevel: level];
|
||||
m_macWindowLevel = level;
|
||||
|
||||
// Only update the level when it has changed, setting a level can cause the OS to reorder the windows in the level
|
||||
if ( level != m_macWindowLevel )
|
||||
{
|
||||
[m_macWindow setLevel: level];
|
||||
m_macWindowLevel = level;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user