We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 540c454 + a411b37 commit 84f49caCopy full SHA for 84f49ca
src/OpenTK.Windowing.Desktop/NativeWindow.cs
@@ -998,7 +998,18 @@ public unsafe NativeWindow(NativeWindowSettings settings)
998
InitialiseJoystickStates();
999
1000
_isFocused = settings.StartFocused;
1001
- if (settings.StartFocused)
+ // Workaround for glfw issue: https://github.com/glfw/glfw/issues/1300
1002
+ // where glfwFocusWindow makes the window visible on macOS even without calling glfwShowWindow.
1003
+ // This is here to make sure the window actually starts hidden.
1004
+ // - Noggin_bops 2024-11-25
1005
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
1006
+ {
1007
+ if (_isVisible == false)
1008
1009
+ _isFocused = false;
1010
+ }
1011
1012
+ if (_isFocused)
1013
{
1014
Focus();
1015
}
0 commit comments