We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1479

Summary: Provide an efficient way of using SDL in a GTK/QT/etc. window.
Product: SDL Reporter: rayne <rayneolivetti>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED ABANDONED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: philipp.wiesemann, theicebreaker007
Version: HG 2.0   
Hardware: All   
OS: All   

Description rayne 2012-04-20 05:06:31 UTC
In SDL 1.2, it can be achieved using the SDL_WINDOWID environment variable  [1], but the trick doesn't seem to be working in SDL 2.

---
[1] http://sdl.beuc.net/sdl.wiki/FAQ_GUI
Comment 1 Philipp Wiesemann 2016-07-19 19:22:42 UTC
In SDL 2.0, SDL_CreateWindowFrom() can be used in some of these cases.
Comment 2 c0d3rguy 2016-10-02 07:22:39 UTC
I've been working on an SDL_SetWindowParent() implementation, which then could be used in the following way:

window = SDL_CreateWindow(..., SDL_WINDOW_BORDERLESS | SDL_WINDOW_HIDDEN | SDL_WINDOW_OPENGL);
SDL_SetWindowParent(window, (void *) PARENT_HWND);
SDL_ShowWindow(window);

The PARENT_HWND is the "actual" OS specific window handle or id, similar to what one would pass to SDL_CreateWindowFrom().

I have a basic "proof of concept" working already and I intend to submit a patch sometime soon.
Comment 3 Ryan C. Gordon 2018-08-06 21:20:20 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.