wayland: Add support for setting window icons via the xdg-toplevel-icon-v1 protocol

This commit is contained in:
Frank Praznik
2024-03-28 10:26:16 -04:00
parent c57cf716af
commit 5d5a685a80
6 changed files with 288 additions and 6 deletions

View File

@@ -46,12 +46,12 @@ encounter limitations or behavior that is different from other windowing systems
### The application icon can't be set via ```SDL_SetWindowIcon()```
- Wayland doesn't support programmatically setting the application icon. To provide a custom icon for your application,
you must create an associated desktop entry file, aka a `.desktop` file, that points to the icon image. Please see the
[Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/) for more information
on the format of this file. Note that if your application manually sets the application ID via the `SDL_APP_ID` hint
string, the desktop entry file name should match the application ID. For example, if your application ID is set
to `org.my_org.sdl_app`, the desktop entry file should be named `org.my_org.sdl_app.desktop`.
- Wayland requires compositor support for the `xdg-toplevel-icon-v1` protocol to set window icons programmatically.
Otherwise, the launcher icon from the associated desktop entry file, aka a `.desktop` file, will typically be used.
Please see the [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/) for
more information on the format of this file. Note that if your application manually sets the application ID via the
`SDL_APP_ID` hint string, the desktop entry file name should match the application ID. For example, if your
application ID is set to `org.my_org.sdl_app`, the desktop entry file should be named `org.my_org.sdl_app.desktop`.
## Using custom Wayland windowing protocols with SDL windows