Skip to content

Window system mismatch - #3866

Merged
paroj merged 3 commits into
OGRECave:masterfrom
paroj:window-system-mismatch
Nov 28, 2026
Merged

paroj merged 3 commits into
OGRECave:masterfrom
paroj:window-system-mismatch

Conversation

@paroj

@paroj paroj commented Nov 28, 2026

Copy link
Copy Markdown
Member

No description provided.

A window provider running on X11 passes externalWindowHandle (or
parentWindowHandle) and no externalWlDisplay. The offscreen fallback
accepted that, ignored the X11 window and rendered into a pbuffer, so the
application showed a black window instead of reporting the backend
mismatch. The existing assert only ran once an onscreen window had been
chosen, so it never saw this case.

Validate the window parameters for every window before choosing the
offscreen path, including the externalWlSurface/externalWlDisplay pair.
The EGL backend is built for either X11 or Wayland, but SDL picks its video
driver independently, so it can select the other one (X11 on a Wayland
session, or the reverse). The window is then of the wrong type and either
fails or, with the offscreen fallback, shows nothing.

Unless the application set SDL_VIDEODRIVER itself, default it to the
driver matching the build, and report a failed video init instead of
continuing.
This is the reverse of the Wayland case: an application can force
SDL_VIDEODRIVER=wayland for an X11 build. The X11 window's assert only
runs once an X11 display is available; without one the offscreen fallback
accepted the Wayland handles, ignored them and rendered into a pbuffer.

Check for the Wayland handles before choosing the offscreen window and
report the backend mismatch.
@paroj
paroj merged commit d6af4f2 into OGRECave:master Nov 28, 2026
9 checks passed
@paroj
paroj deleted the window-system-mismatch branch November 28, 2026 13:21
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