Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SysWW/X11: Return the X11 window as wmwindow and x11window #292

Merged
merged 1 commit into from
May 19, 2023

Conversation

sulix
Copy link
Contributor

@sulix sulix commented May 19, 2023

Steel Storm (and presumably other darkplaces, SDL 1.2-based games) expect x11.wmwindow to be valid if they've created a window and are running under X11. Just pass the same game window like we do for x11.window.

See the old darkplaces code here:
https://github.com/xonotic/darkplaces/blob/a0465ad2ee16719587b0b7a80d4c1c2f7df1ac0e/vid_sdl.c#L2334

This should fix the BadWindow errors on Steel Storm Burning Retribution (issue #290)

Steel Storm (and presumably other darkplaces, SDL 1.2-based games)
expect x11.wmwindow to be valid if they've created a window and are
running under X11. Just pass the same game window like we do for
x11.window.

See the old darkplaces code here:
https://github.com/xonotic/darkplaces/blob/a0465ad2ee16719587b0b7a80d4c1c2f7df1ac0e/vid_sdl.c#L2334

This should fix the BadWindow errors on Steel Storm Burning Retribution
(issue libsdl-org#290)
icculus added a commit that referenced this pull request May 19, 2023
@smcv
Copy link
Contributor

smcv commented May 19, 2023

@icculus, was 4c22ab5 intended to be a functional change? If temp_window is true, before that commit all three window IDs were set to 0, but after that commit fswindow and wmwindow will be set to the temporary window.

I suspect you might have meant this?

-            info12->info.x11.fswindow = info20.info.x11.window;
-            info12->info.x11.wmwindow = info20.info.x11.window;
+            info12->info.x11.fswindow = info12->info.x11.window;
+            info12->info.x11.wmwindow = info12->info.x11.window;

(Sorry, I'm not able to re-test #290 with this change at the moment.)

@icculus
Copy link
Collaborator

icculus commented May 19, 2023

Shoot, good catch, I pasted the wrong thing. 😬

icculus added a commit that referenced this pull request May 19, 2023
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.

4 participants