4 ms·
> 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
by 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.