al_x_set_initial_icon(3alleg5)
β¨ al_x_set_initial_icon β¨
okay bestie, welcome to the Allegro 5 API corner of the internet π this one's a lil function called al_x_set_initial_icon, and she's here to fix your window icon drama. let's get into it π
πΈ NAME πΈ
al_x_set_initial_icon β the Allegro 5 API, but make it β¨iconβ¨
π¦ SYNOPSIS π¦
#include <allegro5/allegro_x.h>
bool al_x_set_initial_icon(ALLEGRO_BITMAP *bitmap)
π DESCRIPTION π
so here's the tea, bestie β on some window managers β and notably Ubuntu's Unity is the main character here β al_set_display_icon literally just does not work π and the workaround is that you have to use a .desktop file. which is fine but also, like, annoying.
BUT. with this function you can set an icon before calling al_create_display π«Ά and it actually works, because the way it does this is by setting the icon before XMapWindow happens. no cap, that's the whole trick. iconic behaviour fr fr π
β SINCE β
5.2.3 β so she's been around a minute π
[Unstable API]: New API. β οΈ heads up bestie, this one's flagged unstable β tread accordingly π
and that's the whole vibe check, babe β¨ this page came to you straight from the Allegro reference manual (al_x_set_initial_icon(3alleg5)) β go forth and icon-ify your windows, you absolute legend πππ¦
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms