Incorrect call to set_app_id on Wayland #101779

Closed
opened 2022-10-12 21:33:01 +02:00 by Nicolas Fella · 9 comments

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.

**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.
Author

Added subscriber: @nicolasfella

Added subscriber: @nicolasfella
Member

Added subscribers: @ideasman42, @OmarEmaraDev

Added subscribers: @ideasman42, @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

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

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

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

@ideasman42 Which project should we tag Wayland/GHOST related reports? I tagged `Platform: Linux`, but that doesn't seem correct.

This issue was referenced by 3980af7453

This issue was referenced by 3980af7453bfcf55dbf29a39475af17a6fcf897b

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2022-10-13 01:14:56 +02:00

@OmarEmaraDev 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.

@OmarEmaraDev 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.

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.

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.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#101779
No description provided.