From 37319a87bf0258949e37ffaaca2d2b174caf2e53 Mon Sep 17 00:00:00 2001 From: JamesWrigley Date: Sun, 28 Jul 2024 11:52:42 +0200 Subject: [PATCH] Ensure that the GLFW window is always visible and decorated Otherwise if the user closes the main GLFW window before closing/merging a viewport, the main window will not be visible the next time the program is started in the same process (i.e. in the REPL). --- ext/GlfwOpenGLBackend.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/GlfwOpenGLBackend.jl b/ext/GlfwOpenGLBackend.jl index 9857297..70011e9 100644 --- a/ext/GlfwOpenGLBackend.jl +++ b/ext/GlfwOpenGLBackend.jl @@ -68,6 +68,8 @@ function ig._render(ui, ctx::Ptr{lib.ImGuiContext}, ::Val{:GlfwOpenGL3}; # Configure GLFW glsl_version = get_glsl_version(opengl_version) + GLFW.WindowHint(GLFW.VISIBLE, true) + GLFW.WindowHint(GLFW.DECORATED, true) GLFW.WindowHint(GLFW.CONTEXT_VERSION_MAJOR, opengl_version.major) GLFW.WindowHint(GLFW.CONTEXT_VERSION_MINOR, opengl_version.minor)