Maniphest T101779

Incorrect call to set_app_id on Wayland
Closed, Resolved

Assigned To
Campbell Barton (campbellbarton)
Authored By
Nicolas Fella (nicolasfella)
Oct 12 2022, 9:33 PM
Tags
  • BF Blender
  • Platform: Linux
Subscribers
Campbell Barton (campbellbarton)
Nicolas Fella (nicolasfella)
Omar Emara (OmarSquircleArt)

Description

System Information
Operating system: Fedora 36

Blender Version
Broken: 3.4.0-alpha+master.f0e1089a33f4

When running Blender on Wayland the id reported to xdg-shell via set_app_id is incorrect.

In https://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/HEAD:/intern/ghost/intern/GHOST_WindowWayland.cpp#l647 it is set to the same as the window title.
This results in it being "Blender". However, the id should match the desktop file name, which for the version downloaded from blender.org is "blender" (lowercase). For the version installed from Flathub the correct value would be "org.blender.Blender"

Quoting https://wayland.app/protocols/xdg-shell#xdg_toplevel:request:set_app_id:

As a best practice, it is suggested to select app ID's that match the basename of the application's .desktop file. For example, "org.freedesktop.FooViewer" where the .desktop file is "org.freedesktop.FooViewer.desktop".

This can be confirmed via "WAYLAND_DEBUG=1 ./blender 2>&1 | grep set_app_id", which shows the call to set_app_id with the wrong value.

This causes for example the window icon being wrong in Plasma Wayland, but there are potentially more things broken because of that.

Revisions and Commits

rB Blender

Related Objects

Mentioned In
rB695614ad3b7a: Fix T101805: Blender icons doesn't show in GNOME 43
T101805: Blender (Linux) does not use its icon anymore in GNOME 43, since Wayland went public
Mentioned Here
rBf0e1089a33f4: GHOST/Wayland: only require libdecor when running in gnome-shell

Event Timeline

Nicolas Fella (nicolasfella) created this task.Oct 12 2022, 9:33 PM
Omar Emara (OmarSquircleArt) changed the task status from Needs Triage to Confirmed.Oct 12 2022, 10:01 PM
Omar Emara (OmarSquircleArt) added a project: Platform: Linux.
Omar Emara (OmarSquircleArt) added subscribers: Campbell Barton (campbellbarton), Omar Emara (OmarSquircleArt).

While not exactly a bug, confirming since this is a best practice that apparently have functional consequences.

Omar Emara (OmarSquircleArt) added a comment.Oct 12 2022, 10:04 PM

@Campbell Barton (campbellbarton) Which project should we tag Wayland/GHOST related reports? I tagged Platform: Linux, but that doesn't seem correct.

Campbell Barton (campbellbarton) closed this task as Resolved by committing rB3980af7453bf: Fix T101779: Incorrect app_id on Wayland.Oct 13 2022, 1:14 AM
Campbell Barton (campbellbarton) claimed this task.
Campbell Barton (campbellbarton) added a commit: rB3980af7453bf: Fix T101779: Incorrect app_id on Wayland.
Campbell Barton (campbellbarton) added a comment.EditedOct 13 2022, 1:18 AM

@Omar Emara (OmarSquircleArt) tagging Platform: Linux seems correct since there is likely to be increasing adoption of Wayland on Linux.

So I think this is fine unless we get many Wayland issues and triaging team prefer to mark separately to make them more managable.

Campbell Barton (campbellbarton) mentioned this in rB695614ad3b7a: Fix T101805: Blender icons doesn't show in GNOME 43.Oct 14 2022, 7:56 AM
Campbell Barton (campbellbarton) added a comment.Oct 14 2022, 7:58 AM

Note that this fix didn't work with the blender builds distributed on blender.org, so now the name follows "blender.desktop".

Anyone packaging Blender will need to follow that convention for the desktop file.