SDL_HINT_APP_ID(3)

NAME
SDL_HINT_APP_ID - A variable setting the app ID string.

HEADER FILE
Defined in SDL3/SDL_hints.h

SYNOPSIS
#include "SDL3/SDL.h"

#define SDL_HINT_APP_ID      SDL_APP_ID"

DESCRIPTION
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: • The application ID must be composed of two or more elements separated by
  a period (.) character. • Each element must contain one or more of the alphanumeric characters
  (A-Z, a-z, 0-9) plus underscore (_) and hyphen (-) and must not start
  with a digit. Note that hyphens, while technically allowed, should not be
  used if possible, as they are not supported by all components that use
  the ID, such as D-Bus. For maximum compatibility, replace hyphens with an
  underscore. • The empty string is not a valid element (ie: your application ID may not
  start or end with a period and it is not valid to have two periods in a
  row). • The entire ID must be less than 255 characters in length. Examples of valid app ID strings: • org.MyOrg.MyApp • com.your_company.your_app 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 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.

AVAILABILITY
This hint is available since SDL 3.0.0.