Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] Set the window icon in a more compatible way #77

Open
nmlgc opened this issue Jan 22, 2025 · 0 comments
Open

[Linux] Set the window icon in a more compatible way #77

nmlgc opened this issue Jan 22, 2025 · 0 comments
Labels
Enhancement New feature or request Portability Porting the game away from 32-bit Windows ~≤0.33 pushes Projected number of pushes needed. Might turn out to get more expensive!

Comments

@nmlgc
Copy link
Owner

nmlgc commented Jan 22, 2025

Explained in the blog post. Support for manually transferred window icons is way more widespread in X11 window managers than our current indirect method via the window class, but SDL_SetWindowIcon()'s single image parameter is inadequate for pixel art that exists at multiple sizes. This would add the raw X11 code for manually transferring our window icon at all of its size variants, which allows the WM to (hopefully) display the closest variant.

For Wayland, the window class method should be enough, but we might still want to issue a xdg_toplevel_icon_v1::set_name() request for good measure.

Alternatively, we could make this more compatible kind of icon support exclusive to the SDL 3 platform layer (#68), and help out the greater community by adding alternate image support to SDL_SetWindowIcon().

@nmlgc nmlgc added Enhancement New feature or request Portability Porting the game away from 32-bit Windows ~≤0.33 pushes Projected number of pushes needed. Might turn out to get more expensive! labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Portability Porting the game away from 32-bit Windows ~≤0.33 pushes Projected number of pushes needed. Might turn out to get more expensive!
Projects
None yet
Development

No branches or pull requests

1 participant