---
name: "al_x_set_initial_icon"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_x_set_initial_icon/3alleg5"
---

# al\_x\_set\_initial\_icon(3alleg5)

Allegro 5 API

## NAME

al\_x\_set\_initial\_icon - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_x.h>
  bool al_x_set_initial_icon(ALLEGRO_BITMAP *bitmap)
  ```

## DESCRIPTION

On some window managers (notably Ubuntu’s Unity) al\_set\_display\_icon doesn’t work and you need to use a .desktop file. But with this function you can set an icon before calling al\_create\_display. This works by setting the icon before XMapWindow.

## SINCE

5\.2.3

*\[Unstable API\]:* New API.
