4 ms·
> No, there are protocols to negotiate whether an app has server side decoration or not and the compositor has the last say. The compositor can implement that
by mort96 6y ago
> No, there are protocols to negotiate whether an app has server side decoration or not and the compositor has the last say.
The compositor can implement that protocol and just respond with "this compositor doesn't support SSDs". GNOME does this, so all toolkits must use CSDs if they wanna work on the most popular Wayland compositor.
Incidentally, that's hell for all the simple libraries out there which just exist to get a GL window on the screen. GLFW, GLEW, SDL, etc. all have to implement CSDs now if they wanna work with Wayland. It also means that it's no longer feasible to just make a Linux application which uses the windowing system directly; everything must use a huge toolkit now.
EDIT: To clarify, I don't think this is an issue with Wayland, but with GNOME. There's no reason it couldn't have supported SSDs like every other Wayland compositor. But as it stands, it hurts the Wayland ecosystem.
- cycloptic 6y agoGLFW and SDL are looking at using libdecoration to draw CSDs. Yes it's an additional dependency but most applications won't need to worry about it unless they need it. The way GNOME is built it's not really possible architecturally for them to support SSDs in Wayland. Maybe that will change if they ever get around to redesigning mutter and gnome-shell, but I wouldn't wait for it.
- mort96 6y agoI've seen libdecoration, and yeah, that seems like their intended solution to this. It doesn't seem like a terrible solution, but last time I looked at it at least, libdecoration was a long way off being production ready, and GNOME with Wayland is shipping _right now_ and must be supported.
- cycloptic 6y agoYou can use a library like that or you can draw your own decorations. There unfortunately is no other option. I don't see it as being likely that GNOME will support SSD any time soon, it just isn't designed for that.
- mort96 6y agoI know, and that's kind of what I'm complaining about. There's no reason it couldn't support SSDs.
- cycloptic 6y agoI was trying to be clear here: There is a reason and it's that it's not really possible architecturally for them to support SSDs in Wayland; doing so would require a redesign of significant parts of the compositor's code. I'm sorry if that was misunderstood. If you're trying to say they should have anticipated this and made a different architectural decision years ago, maybe that's true, but that also offers no practical solution to the applications that need to support it right now.
- mort96 6y agoI am trying to say that maybe they should have made the architectural decisions which wouldn't prevent non-GTK applications from working in GNOME. That's all.
- cycloptic 6y agoI don't know what you're trying to get at. We can sit here and argue and say they should have done this and they should have done that, but that doesn't help anybody who wants support for them at this current moment. And please don't exaggerate, non-GTK applications do work in GNOME. Qt5 has native CSDs that will show up in GNOME. If the application is a game or something that doesn't support CSD then the experience is somewhat degraded but they still work. You can resize and move any window by holding Super and Left/Middle clicking. I won't pretend the situation is ideal but I also don't believe it's totally unusable or on a bad trajectory at the moment—like I said the other libraries are working on getting CSD support too.
- solarkraft 6y ago> There unfortunately is no other option. Gnome could stop being unreasonably obstructionist, but that indeed seems unlikely.
- ywei3410 6y ago> GLFW, GLEW, SDL, etc. all have to implement CSDs now if they wanna work with Wayland. I honestly don't understand what you're talking about here? If you want to get a window on the screen with OpenGL or Vulkan you don't implement anything special for Wayland. In fact with Vulkan+Wayland, it's fairly easy to do it without any third-party dependencies, with OpenGL you'll probably need EGL which is a Khronos dependency. Here's some slightly outdated example code [1]. [1] https://gist.github.com/Miouyouyou/ca15af1c7f2696f66b0e013058f110b4 https://gist.github.com/Miouyouyou/ca15af1c7f2696f66b0e01305...
- mort96 6y agoIf you just create a Wayland window, GNOME will draw _only_ that window, with no decorations. The window can't be moved, minimized, resized, etc. because there's no decorations. The window's content shows up, but that's it.
- ywei3410 6y agoI don't believe that's correct. The move, minimize, full-screen and resize seems to be part of the xdg_shell protocol (which has no extra methods for decorations and is only for window roles etc...) under the configure event [1]. I suspect that's how the tiling window managers like sway do it without extra server-side decorations. Possibly this is a subtle distinction, but I do think it matters. [1] https://github.com/wayland-project/wayland-protocols/blob/master/stable/xdg-shell/xdg-shell.xml https://github.com/wayland-project/wayland-protocols/blob/ma...
- mort96 6y agoSway does server-side decorations. It draws window borders and a title bar for you, and handles the drag events in the title bar and borders for you. Go ahead and make a basic Wayland window in GNOME. Compare the user experience to KDE or Sway.
- ywei3410 6y agoI believe you misread my comment; I said that the full-screen, minimize, re-size isn't part of the server-side decoration extension, but was part of a more basic xdg_shell protocol through the configure event. I was objecting to the fact that you said that windows did not have this capability without the server-side extensions, whereas I think they can be through configure. I did not dispute whether sway had server-side decorations or not.