Window Decorations Not Present on GNOME - Wayland #98612

Closed
opened 2022-06-05 14:34:16 +02:00 by Caden Mitchell · 20 comments

System Information
Operating system: Fedora Linux 36 (amd64)
Graphics card: AMD Radeon RX 5700 XT

Blender Version
Broken: example: 3.3.0 Alpha, e90ba74d3e, master, 2022-06-5

Short description of error
Following official Fedora instructions to build on Linux with Walyand support, Blender launches perfectly functional, but without Window decorations. Works as expected with only X11 support.

Exact steps for others to reproduce the error
Build Blender with wayland flags on GNOME 42, Wayland.

Screenshot
Screenshot from 2022-06-05 06-33-23.png

**System Information** Operating system: Fedora Linux 36 (amd64) Graphics card: AMD Radeon RX 5700 XT **Blender Version** Broken: example: 3.3.0 Alpha, e90ba74d3eb8, master, 2022-06-5 **Short description of error** Following official Fedora instructions to build on Linux with Walyand support, Blender launches perfectly functional, but without Window decorations. Works as expected with only X11 support. **Exact steps for others to reproduce the error** Build Blender with wayland flags on GNOME 42, Wayland. **Screenshot** ![Screenshot from 2022-06-05 06-33-23.png](https://archive.blender.org/developer/F13133661/Screenshot_from_2022-06-05_06-33-23.png)
Author

Added subscriber: @Caden-Mitchell

Added subscriber: @Caden-Mitchell

Added subscriber: @Memento

Added subscriber: @Memento
Member

Added subscribers: @christian.rauch, @OmarEmaraDev

Added subscribers: @christian.rauch, @OmarEmaraDev
Member

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

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

Gnome on Wayland doesn't support server side window decorations as far as I know, so maybe this is a known limitation? See D11368.
Maybe @christian.rauch can give more information about this.

Gnome on Wayland doesn't support server side window decorations as far as I know, so maybe this is a known limitation? See [D11368](https://archive.blender.org/developer/D11368). Maybe @christian.rauch can give more information about this.

Yes, GNOME does not implement server-side decorations. But this is not a requirement for Wayland. Actually, Wayland clients are expected to draw their own decorations (like on Windows and macOS). There are ways to have the compositor draw the decorations or libraries to draw them client-side.

  1. There is the xdg-decoration protocol - to negotiate with a compositor/server who is drawing the window decorations. But this one is not implemented by GNOME Shell and it is unlikely that it will be supported by GNOME in the long-term.

  2. There is also a library libdecor - , which I am contributing to too, to implement client-side decorations. I actually implemented this for Blender a long time ago on one of my branches (D7989), but did not go ahead because of the uncertainty around Blender on Wayland. This needs a rebase and a couple of changes to work with the most recent state. I may come back to this once the issues around EGL (#90676) are sorted out.

Yes, GNOME does not implement server-side decorations. But this is not a requirement for Wayland. Actually, Wayland clients are expected to draw their own decorations (like on Windows and macOS). There are ways to have the compositor draw the decorations or libraries to draw them client-side. 1. There is the `xdg-decoration` protocol - [x] to negotiate with a compositor/server who is drawing the window decorations. But this one is not implemented by GNOME Shell and it is unlikely that it will be supported by GNOME in the long-term. 2. There is also a library `libdecor` - [x], which I am contributing to too, to implement client-side decorations. I actually implemented this for Blender a long time ago on one of my branches ([D7989](https://archive.blender.org/developer/D7989)), but did not go ahead because of the uncertainty around Blender on Wayland. This needs a rebase and a couple of changes to work with the most recent state. I may come back to this once the issues around EGL (#90676) are sorted out. - [x] https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml - [x] https://gitlab.gnome.org/jadahl/libdecor
Member

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

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Member

Thanks for the information. Then I think we can confirm this for now until the necessary patches land.

Thanks for the information. Then I think we can confirm this for now until the necessary patches land.
Author

Alright I see. I'm eagerly awaiting these changes. Currently, when Blender (with Wayland support) summons a new window under Wayland, it appears initially with the completely wrong dimensions and position. Moving the window using something like the meta/super/Windows key will make it snap back into the right dimensions. It also seems like you can use window tiling just fine. Seems at least most of this will probably be fixed when we have correct window decorations.

Alright I see. I'm eagerly awaiting these changes. Currently, when Blender (with Wayland support) summons a new window under Wayland, it appears initially with the completely wrong dimensions and position. Moving the window using something like the meta/super/Windows key will make it snap back into the right dimensions. It also seems like you can use window tiling just fine. Seems at least most of this will probably be fixed when we have correct window decorations.

Added subscriber: @alvaroperez

Added subscriber: @alvaroperez

Added subscriber: @1ace

Added subscriber: @1ace

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2022-06-24 16:18:37 +02:00

Closing this task as resolves since support has been committed 29755e1df8, although there is some work left with library linking to enable this by default.

Closing this task as resolves since support has been committed 29755e1df8, although there is some work left with library linking to enable this by default.

Added subscriber: @Luya-Tshimbalanga

Added subscriber: @Luya-Tshimbalanga

Thank you very much Caden for implementing Wayland support for Blender. For further testing the implementation, as a Fedora maintainer, we will enable support on the development repository for testing.

Thank you very much Caden for implementing Wayland support for Blender. For further testing the implementation, as a Fedora maintainer, we will enable support on the development repository for testing.
Author

In #98612#1415351, @Luya-Tshimbalanga wrote:
Thank you very much Caden for implementing Wayland support for Blender. For further testing the implementation, as a Fedora maintainer, we will enable support on the development repository for testing.

Thank you for the kind words, but honestly I didn't do shit. Thank Campbell, Christian Rauch, and the others. I just complained.

I would also wait on building for Wayland. It seems Wayland support is still incomplete as the program still has no titlebar, and enabling the optional window decoration system looks completely wrong. It is not a native QT or GTK titlebar, but rather an obscure, ugly system called "libdecor". If you want to test it with the titlebar, you need to build with this: make release -j BUILD_CMAKE_ARGS="-DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_WAYLAND_LIBDECOR=ON"

> In #98612#1415351, @Luya-Tshimbalanga wrote: > Thank you very much Caden for implementing Wayland support for Blender. For further testing the implementation, as a Fedora maintainer, we will enable support on the development repository for testing. Thank you for the kind words, but honestly I didn't do shit. Thank Campbell, Christian Rauch, and the others. I just complained. I would also wait on building for Wayland. It seems Wayland support is still incomplete as the program still has no titlebar, and enabling the optional window decoration system looks completely wrong. It is not a native QT or GTK titlebar, but rather an obscure, ugly system called "libdecor". If you want to test it with the titlebar, you need to build with this: `make release -j BUILD_CMAKE_ARGS="-DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_WAYLAND_LIBDECOR=ON"`

In #98612#1418958, @Caden-Mitchell wrote:

  • window decoration system looks completely wrong. It is not a native QT or GTK titlebar, but rather an obscure, ugly system called "libdecor".

Calling libdecor "ugly" and "obscure" is unkind and certainly not fair. It has it's own style instead of chasing after QT or GTK (and neither of them chases after the other one and you're not calling them ugly for that, are you?), and it's become the standard for any app that's not built on QT or GTK, and it's used by frameworks such as SDL which are very popular, so it's definitely not obscure either.

If you don't like design choices you can always raise an issue to suggest what you'd prefer to see, instead of name-calling.

> In #98612#1418958, @Caden-Mitchell wrote: > - [x] window decoration system looks completely wrong. It is not a native QT or GTK titlebar, but rather an obscure, ugly system called "libdecor". Calling libdecor "ugly" and "obscure" is unkind and certainly not fair. It has it's own style instead of chasing after QT or GTK (and neither of them chases after the other one and you're not calling them ugly for that, are you?), and it's become the standard for any app that's not built on QT or GTK, and it's used by frameworks such as SDL which are very popular, so it's definitely not obscure either. If you don't like design choices you can always raise an issue to suggest what you'd prefer to see, instead of name-calling.
Author

In #98612#1418999, @1ace wrote:

In #98612#1418958, @Caden-Mitchell wrote:

  • window decoration system looks completely wrong. It is not a native QT or GTK titlebar, but rather an obscure, ugly system called "libdecor".

Calling libdecor "ugly" and "obscure" is unkind and certainly not fair. It has it's own style instead of chasing after QT or GTK (and neither of them chases after the other one and you're not calling them ugly for that, are you?), and it's become the standard for any app that's not built on QT or GTK, and it's used by frameworks such as SDL which are very popular, so it's definitely not obscure either.

If you don't like design choices you can always raise an issue to suggest what you'd prefer to see, instead of name-calling.

Sorry. Perhaps I was a bit harsh. Please understand, most Linux users expect applications that match the rest of the system style. Anything that breaks the system theme sticks out and looks subjectively bad, and objectively worse than using native libraries. At any rate, this change feels like a major regression from the X11 method. In X11, Blender will inherit a native titlebar due to the way X11 works. It would be nice to see the Wayland implementation do this.

It is my understanding that Wayland does not add Window Decorations on it's own like X11. Perhaps Blender can be built with BOTH QT and GTK systems, and then switch accordingly. This would make more sense to me personally, as Gnome and KDE Plasma are pretty much the only two desktops that can completely support Wayland properly, and QT and GTK are the two primary graphics libraries for the Linux desktop.

> In #98612#1418999, @1ace wrote: >> In #98612#1418958, @Caden-Mitchell wrote: >> - [x] window decoration system looks completely wrong. It is not a native QT or GTK titlebar, but rather an obscure, ugly system called "libdecor". > > Calling libdecor "ugly" and "obscure" is unkind and certainly not fair. It has it's own style instead of chasing after QT or GTK (and neither of them chases after the other one and you're not calling them ugly for that, are you?), and it's become the standard for any app that's not built on QT or GTK, and it's used by frameworks such as SDL which are very popular, so it's definitely not obscure either. > > If you don't like design choices you can always raise an issue to suggest what you'd prefer to see, instead of name-calling. Sorry. Perhaps I was a bit harsh. Please understand, most Linux users expect applications that match the rest of the system style. Anything that breaks the system theme sticks out and looks subjectively bad, and objectively worse than using native libraries. At any rate, this change feels like a major regression from the X11 method. In X11, Blender will inherit a native titlebar due to the way X11 works. It would be nice to see the Wayland implementation do this. It is my understanding that Wayland does not add Window Decorations on it's own like X11. Perhaps Blender can be built with BOTH QT and GTK systems, and then switch accordingly. This would make more sense to me personally, as Gnome and KDE Plasma are pretty much the only two desktops that can completely support Wayland properly, and QT and GTK are the two primary graphics libraries for the Linux desktop.

In #98612#1419180, @Caden-Mitchell wrote:
Sorry. Perhaps I was a bit harsh. Please understand, most Linux users expect applications that match the rest of the system style. Anything that breaks the system theme sticks out and looks subjectively bad, and objectively worse than using native libraries. At any rate, this change feels like a major regression from the X11 method.

In the perfect Linux-Desktop world, every application would use the same toolkit. Every application that uses a different toolkit than the majority of your applications will visually stick out. There is no way around it. I doubt that Blender wants to implement the UI in every desktop's native toolkit.

In X11, Blender will inherit a native titlebar due to the way X11 works. It would be nice to see the Wayland implementation do this.

I suggest you read a bit about how decorations are implemented in Wayland to understand why things are how they are. You will soon find out that there are client-side decorations (CSD) and server-side decorations (SSD). If you want to improve either of them, there are plenty of projects to contribute.

It is my understanding that Wayland does not add Window Decorations on it's own like X11. Perhaps Blender can be built with BOTH QT and GTK systems, and then switch accordingly. This would make more sense to me personally, as Gnome and KDE Plasma are pretty much the only two desktops that can completely support Wayland properly, and QT and GTK are the two primary graphics libraries for the Linux desktop.

Not sure if you have seen the "native" Qt decorations. They also stick out on GTK desktop environments and are missing some functionality. If you want to convince developers to use GTK or Qt for Blenders windowing, go ahead. Otherwise, have a look at https://gitlab.gnome.org/jadahl/libdecor/-/merge_requests/43.

> In #98612#1419180, @Caden-Mitchell wrote: > Sorry. Perhaps I was a bit harsh. Please understand, most Linux users expect applications that match the rest of the system style. Anything that breaks the system theme sticks out and looks subjectively bad, and objectively worse than using native libraries. At any rate, this change feels like a major regression from the X11 method. In the perfect Linux-Desktop world, every application would use the same toolkit. Every application that uses a different toolkit than the majority of your applications will visually stick out. There is no way around it. I doubt that Blender wants to implement the UI in every desktop's native toolkit. > In X11, Blender will inherit a native titlebar due to the way X11 works. It would be nice to see the Wayland implementation do this. I suggest you read a bit about how decorations are implemented in Wayland to understand why things are how they are. You will soon find out that there are client-side decorations (CSD) and server-side decorations (SSD). If you want to improve either of them, there are plenty of projects to contribute. > It is my understanding that Wayland does not add Window Decorations on it's own like X11. Perhaps Blender can be built with BOTH QT and GTK systems, and then switch accordingly. This would make more sense to me personally, as Gnome and KDE Plasma are pretty much the only two desktops that can completely support Wayland properly, and QT and GTK are the two primary graphics libraries for the Linux desktop. Not sure if you have seen the "native" Qt decorations. They also stick out on GTK desktop environments and are missing some functionality. If you want to convince developers to use GTK or Qt for Blenders windowing, go ahead. Otherwise, have a look at https://gitlab.gnome.org/jadahl/libdecor/-/merge_requests/43.
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
8 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#98612
No description provided.