Skip to content

Commit f2fd800

Browse files
authored
Fix VersionUnavailable warning (#662)
When building an app on hover, we are getting the following error ``` GLFW: An uncaught error has occurred: VersionUnavailable: NSGL: Failed to create OpenGL context ``` This is happening when the Resource Window is created in background. The Version hint requirements is being reverted to the initial values after we create the main window, so the resource window does not have a version hint set. This commit calls the global version hint code after we reset it, to ensure the resource window have it set. This fixes the warning, but it's not the actual root-cause to the Flutter 3.0 errors. It is another warning that is misleading the investigation on that bug.
1 parent b3c5937 commit f2fd800

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

application.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ func NewApplication(opt ...Option) *Application {
6969
// Though optional, it is recommended that all embedders set this callback as
7070
// it will lead to better performance in texture handling.
7171
func createResourceWindow(window *glfw.Window) (*glfw.Window, error) {
72+
opengl.GLFWWindowHint()
7273
glfw.WindowHint(glfw.Decorated, glfw.False)
7374
glfw.WindowHint(glfw.Visible, glfw.False)
7475
if runtime.GOOS == "linux" {

0 commit comments

Comments
 (0)