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

App icon not working on GNOME/Wayland #3992

Open
Barugon opened this issue Feb 6, 2024 · 4 comments
Open

App icon not working on GNOME/Wayland #3992

Barugon opened this issue Feb 6, 2024 · 4 comments
Labels
bug Something is broken native-linux Problem specific to Linux

Comments

@Barugon
Copy link
Contributor

Barugon commented Feb 6, 2024

Describe the bug
I set the app's icon but it shows as the default GNOME app icon.

To Reproduce
Here's the steps that I used:

  let icon = image::load_from_memory(include_bytes!("../res/icon.png")).unwrap();
  let icon = egui::IconData {
    width: icon.width(),
    height: icon.height(),
    rgba: icon.into_rgba8().into_raw(),
  };

  let viewport = egui::ViewportBuilder::default()
    .with_icon(icon);

  let native = eframe::NativeOptions {
    viewport,
    ..Default::default()
  };

Expected behavior
The correct icon is shown for the app.

Screenshots
Screenshot from 2024-02-06 15-12-03

Desktop (please complete the following information):
Hardware Information:

  • Hardware Model: ASUS PRIME B550-PLUS
  • Memory: 32.0 GiB
  • Processor: AMD Ryzen™ 9 3900X × 24
  • Graphics: AMD Radeon™ RX 7800 XT
  • Disk Capacity: 2.0 TB

Software Information:

  • Firmware Version: 3405
  • OS Name: Fedora Linux 39 (Workstation Edition)
  • OS Build: (null)
  • OS Type: 64-bit
  • GNOME Version: 45.3
  • Windowing System: Wayland
  • Kernel Version: Linux 6.7.3-200.fc39.x86_64
@Barugon Barugon added the bug Something is broken label Feb 6, 2024
@Barugon
Copy link
Contributor Author

Barugon commented Feb 6, 2024

Note that the app icon works fine when using Xorg.

@emilk
Copy link
Owner

emilk commented Feb 7, 2024

We need a volunteer to add support for this in either winit or in https://github.com/emilk/egui/blob/master/crates/eframe/src/native/app_icon.rs

@emilk emilk added the native-linux Problem specific to Linux label Feb 7, 2024
@alufers
Copy link

alufers commented Feb 16, 2024

Note:
The wayland protocol doesn't support setting custom app icons programmatically, see:

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/52
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/269

Currently the working way to set the app icon is tho install a .desktop file and set the app id to match it.

@Barugon
Copy link
Contributor Author

Barugon commented Feb 16, 2024

Note: The wayland protocol doesn't support setting custom app icons programmatically, see:

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/52 https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/269

Currently the working way to set the app icon is tho install a .desktop file and set the app id to match it.

I have a .desktop file. That works for the GNOME app grid but not the switcher.

Anyway, I'll have a look into this when I have some time.

FloezeTv added a commit to cda-tum/mqt-naviz that referenced this issue Jan 26, 2025
Sets favicon in web-build and native icon in native build.
Does not work on GNOME/Wayland
(see emilk/egui#3992)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken native-linux Problem specific to Linux
Projects
None yet
Development

No branches or pull requests

3 participants