Skip to content

Fix OpenGL context switch when returning from Overview - #240

Open
Der-Jan wants to merge 1 commit into
QIDITECH:mainfrom
Der-Jan:fix/overview-return-gl-context
Open

Der-Jan wants to merge 1 commit into
QIDITECH:mainfrom
Der-Jan:fix/overview-return-gl-context

Conversation

@Der-Jan

@Der-Jan Der-Jan commented Oct 1, 2026

Copy link
Copy Markdown

Problem

Clicking Return in Overview can terminate QIDIStudio on Linux with an X11/GLX BadMatch error and exit code 1.

The Return handler calls reload_scene() on the Prepare canvas while Overview is still rendering. This rebinds the shared OpenGL context before Overview finishes drawing and calls
SwapBuffers().

Fix

Defer the Return action using the existing end-of-frame callback mechanism, so Overview finishes rendering and swapping buffers before the Prepare canvas is reloaded.

The existing view-change event, gizmo resets, explosion-ratio reset, and usage tracking are preserved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant