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 2918

Summary: Parent Surfaces for SDL GUI
Product: SDL Reporter: x414e54
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.3   
Hardware: x86_64   
OS: Linux   

Description x414e54 2015-03-22 06:58:35 UTC
There needs to be a way to specify that a window is related in some way to another window. This parent window would ideally not show up in taskbars on desktop systems and would be ontop of the parent but does not necessarily have to be guaranteed to be modal.

SDL-gui-backend for UE4 is currently using a newly added SDL_SetWindowModalFor which uses the  x11 transient and I have test implemented using wl_shell_surface_set_transient on Wayland. 

But I am hoping this could be up-streamed quickly in a cross-platform way.

On systems which do not support parent/child windows they could be handed a subsurface or the window is just placed globally as normal on the same display.

On system which only support fullscreen "windows" then just creates a new normal window with possibly some overlay or platform specific options/keybind to switch between the parent and child windows.

The api should have options to either guarantee where the window will be placed relative to the parent or what happens if it cannot be places outside or if it will.
Comment 1 Ryan C. Gordon 2017-08-13 05:08:27 UTC
Sorry, I didn't realize this bug report existed (let alone that it was still open)...this was fixed about a month after this report was opened by https://hg.libsdl.org/SDL/rev/f7ab0613164a, which was part of the effort to merge some of the UE4 additions back into SDL.

--ryan.