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 4630

Summary: Missing x11 _NET_WM_WINDOW_TYPEs
Product: SDL Reporter: toqozz
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2 CC: icculus
Version: HG 2.1   
Hardware: x86_64   
OS: Linux   

Description toqozz 2019-05-17 03:24:19 UTC
SDL2 currently supports the following window flags on x11:

- "_NET_WM_WINDOW_TYPE_UTILITY"
- "_NET_WM_WINDOW_TYPE_TOOLTIP"
- "_NET_WM_WINDOW_TYPE_POPUP_MENU"
- "_NET_WM_WINDOW_TYPE_NORMAL"

The following flags are available in the standard (see: https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472629520):

- "_NET_WM_WINDOW_TYPE_DESKTOP"
- "_NET_WM_WINDOW_TYPE_DOCK"
- "_NET_WM_WINDOW_TYPE_TOOLBAR"
- "_NET_WM_WINDOW_TYPE_MENU"
- "_NET_WM_WINDOW_TYPE_UTILITY"
- "_NET_WM_WINDOW_TYPE_SPLASH"
- "_NET_WM_WINDOW_TYPE_DIALOG"
- "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU"
- "_NET_WM_WINDOW_TYPE_POPUP_MENU"
- "_NET_WM_WINDOW_TYPE_TOOLTIP"
- "_NET_WM_WINDOW_TYPE_NOTIFICATION"
- "_NET_WM_WINDOW_TYPE_COMBO"
- "_NET_WM_WINDOW_TYPE_DND"
- "_NET_WM_WINDOW_TYPE_NORMAL"

Supporting the missing flags should be quite trivial; are these out of scope for SDL?

I have a program which requires the "_NET_WM_WINDOW_TYPE_NOTIFICATION" flag, which marks a window as non-resizable, and not able to grab focus from the window manager.  Currently, (I think), it is not possible to make a window with this behavior using solely SDL's windowing.
Comment 1 Ryan C. Gordon 2019-05-18 16:36:07 UTC
We don't currently have any intention to add more of these; the ones we added were to make it feasible to build a reasonable GUI toolkit on top of SDL (which Epic Games did with their Slate UI in Unreal Engine 4), but we aren't looking to replace something like GTK+ or Qt for any possible desktop app's functionality.

Each of these consists of a non-trivial amount of effort to expose them as cross-platform APIs, and often we end up doing some really ugly tapdancing to make the Windows, Mac, and X11 versions work similarly.

--ryan.