Wayland build looks out of place due to Libdecor #101176

Closed
opened 2022-09-18 23:00:25 +02:00 by Caden Mitchell · 9 comments

System Information
Operating system: Fedora Linux (Gnome on Wayland)

Blender Version
Broken: 3.4.0 Alpha, 1f4dc51d09, master, 2022-09-10 23:06

Short description of error
The visual style of the application is facing a major regression from it's X11 counterpart. In Linux, applications that feature native visual designs are valued and expected. In X11, Blender would inherit a native window decoration system such as QT or GTK. This helped Blender to fit into the Linux desktop. In Wayland, Libdecor is used, and it does not look anything like a native application. It does not follow the system theme, it does not respect the titlebar button layout (ie. left or right), and looks more like a Windows application.

Screenshot from 2022-09-18 14-54-52.png
Pictured:
Top - Blender compiled for X11
Middle - Blender compiled for Walyand with Libdecor
Bottom - Native Wayland application

Please note how I have minimize and maximize hidden, have my window controls at the left, and have a theme applied. X11 and native applications will reflect any combination of these options, Libdecor sticks out and is not ideal.

Proposal: I am not sure what it would take, but I think it would be nice for Blender to use a library that automatically applies the appropriate window decorations depending on whether the desktop is QT or GTK. Otherwise, perhaps Blender could include both GTK and QT libraries and switch depending on desktops. It may also be possible to use system libraries rather than bake a window decoration system into Blender. Maybe as a workaround, users can select either Libdecor, GTK, or QT in the build system.

Exact steps for others to reproduce the error
Build Blender with the following flags: BUILD_CMAKE_ARGS="-DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_WAYLAND_LIBDECOR=ON"

**System Information** Operating system: Fedora Linux (Gnome on Wayland) **Blender Version** Broken: 3.4.0 Alpha, 1f4dc51d09af, master, 2022-09-10 23:06 **Short description of error** The visual style of the application is facing a major regression from it's X11 counterpart. In Linux, applications that feature native visual designs are valued and expected. In X11, Blender would inherit a native window decoration system such as QT or GTK. This helped Blender to fit into the Linux desktop. In Wayland, Libdecor is used, and it does not look anything like a native application. It does not follow the system theme, it does not respect the titlebar button layout (ie. left or right), and looks more like a Windows application. ![Screenshot from 2022-09-18 14-54-52.png](https://archive.blender.org/developer/F13508357/Screenshot_from_2022-09-18_14-54-52.png) Pictured: Top - Blender compiled for X11 Middle - Blender compiled for Walyand with Libdecor Bottom - Native Wayland application Please note how I have minimize and maximize hidden, have my window controls at the left, and have a theme applied. X11 and native applications will reflect any combination of these options, Libdecor sticks out and is not ideal. Proposal: I am not sure what it would take, but I think it would be nice for Blender to use a library that automatically applies the appropriate window decorations depending on whether the desktop is QT or GTK. Otherwise, perhaps Blender could include both GTK and QT libraries and switch depending on desktops. It may also be possible to use system libraries rather than bake a window decoration system into Blender. Maybe as a workaround, users can select either Libdecor, GTK, or QT in the build system. **Exact steps for others to reproduce the error** Build Blender with the following flags: `BUILD_CMAKE_ARGS="-DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_WAYLAND_LIBDECOR=ON"`
Author

Added subscriber: @Caden-Mitchell

Added subscriber: @Caden-Mitchell
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42

The purpose of using Libdecor was to avoid having to implement this ourselves.

Ideally Libdecor would integrate with the underlying desktop environment.

Blender doing it's own client-side decorations is a possibility too, but a fairly large project.

The purpose of using Libdecor was to avoid having to implement this ourselves. Ideally Libdecor would integrate with the underlying desktop environment. Blender doing it's own client-side decorations is a possibility too, but a fairly large project.

Added subscriber: @christian.rauch

Added subscriber: @christian.rauch

Please do some research on this topic to understand what libdecor is and how it works. Libdecor itself does not have a visual style. It uses plugins to do the actual rendering. There is a GTK plugin in the works: https://gitlab.gnome.org/jadahl/libdecor/-/merge_requests/43

The toolkits that I used do not allow you to just apply window decorations to arbitrary surfaces. If you find one that integrates well and does allow this, then purpose a new libdecor plugin.

You are also free to propose a working counterexample.

Please do some research on this topic to understand what libdecor is and how it works. Libdecor itself does not have a visual style. It uses plugins to do the actual rendering. There is a GTK plugin in the works: https://gitlab.gnome.org/jadahl/libdecor/-/merge_requests/43 The toolkits that I used do not allow you to just apply window decorations to arbitrary surfaces. If you find one that integrates well and does allow this, then purpose a new libdecor plugin. You are also free to propose a working counterexample.

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

@christian.rauch thanks for the information, since this likely needs to be handled by libdecor I don't think it makes sense to keep the Blender task open, I'll link to your merge-request from the main wayland task and close this one.

@christian.rauch thanks for the information, since this likely needs to be handled by libdecor I don't think it makes sense to keep the Blender task open, I'll link to your merge-request from the main wayland task and close this one.

Setting as resolved since libdecor now supported since libdecor v0.2.0.
On my system, running Blender in Gnome 44.5 uses native (GTK) decor.

Setting as resolved since libdecor now supported since libdecor v0.2.0. On my system, running Blender in Gnome 44.5 uses native (GTK) decor.
Campbell Barton added
Status
Resolved
Type
Report
and removed
Status
Archived
Type
Known Issue
labels 2023-10-03 08:05:53 +02:00
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
5 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#101176
No description provided.