SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)

SDL_HINT_APP_ID

A variable setting the app ID string.

Header File

Defined in <SDL3/SDL_hints.h>

Syntax

#define SDL_HINT_APP_ID      "SDL_APP_ID"

Remarks

This string is used by desktop compositors to identify and group windows together, as well as match applications with associated desktop settings and icons.

On Wayland this corresponds to the "app ID" window property and on X11 this corresponds to the WM_CLASS property. Windows inherit the value of this hint at creation time. Changing this hint after a window has been created will not change the app ID or class of existing windows.

For *nix platforms, this string should be formatted in reverse-DNS notation and follow some basic rules to be valid:

Examples of valid app ID strings:

Desktops such as GNOME and KDE require that the app ID string matches your application's .desktop file name (e.g. if the app ID string is 'org.MyOrg.MyApp', your application's .desktop file should be named 'org.MyOrg.MyApp.desktop').

If you plan to package your application in a container such as Flatpak, the app ID should match the name of your Flatpak container as well.

If not set, SDL will attempt to use the application executable name. If the executable name cannot be retrieved, the generic string "SDL_App" will be used.

This hint should be set before SDL is initialized.

Version

This hint is available since SDL 3.0.0.


CategoryAPI, CategoryAPIMacro


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.