7 ms·
I'm looking into starting implementing Wayland support in Allegro 5 game library, which is basically a multiplatform way to get and handle a window with OpenGL
by seba_dos1 9y ago
I'm looking into starting implementing Wayland support in Allegro 5 game library, which is basically a multiplatform way to get and handle a window with OpenGL context inside. You get some drawing API, some helper functions useful for games, events etc. There is no toolkit used, because why would it need one?
So I can support KDE's SSD protocol. Fine, can do it. But... what about other compositors, like GNOME's Mutter? Oh, great, so I'll have to implement full working window decoration by myself, only for this single windowing system on a single platform? How should it look? How should it behave? How should it be configured? Who the hell even thought that would be a good idea?
OK, let's check SDL2 then, it's a quite similar and nowadays more popular library, I wonder how did they do it, as I heard they have Wayland support already done.
Oh... window decorations on SDL2/Wayland are not implemented, so there is just no decoration. https://bugzilla.libsdl.org/show_bug.cgi?id=2710 https://bugzilla.libsdl.org/show_bug.cgi?id=2710
Awesome. I'll probably end up with the same thing, as I'm using KDE Plasma and it will just work fine for me. Whatever.
CSD is an awful idea and whoever came up with it should feel bad. Massive step back.
- jhasse 9y agoI think the idea is that you use Gtk+ to get the window.
- Doxin 9y agoWhich is all fine and dandy if all you care about is GNOME, But presents a real problem when you're trying to be cross-desktop-environment compatible.
- jhasse 9y agoIt isn't as cross-DE as it could be, but a lot more than just GNOME: MATE, Budgie, Pantheon, XFCE, ...
- seba_dos1 9y agoAnd add big Gtk+ dependency to the library (and in result, all the games that use it) just to get the window decorations drawn on a single windowing system? Which will probably look ugly and out of place on non-Gtk+ DEs anyway? That's an unacceptable idea.
- jhasse 9y agoWhy? You don't have Gtk+ installed?
- seba_dos1 9y agoOn some systems where I would like to see Allegro on Wayland running, there's no Gtk+. Also, it adds a very big dependency to distribute with your game if you want to bundle the deps or link statically, so the binary doesn't break in a few years when distributions will stop packaging Gtk+3. All this for no other reason than getting the window decorations drawn on poorly designed desktop environments. (in fact, Allegro already has an extension that makes it use Gtk+ on X11 if you want to use native dialogs and menus, but it's a completely optional extension for a reason, as most games don't need them anyway)
- jhasse 9y ago> On some systems where I would like to see Allegro on Wayland running, there's no Gtk+. Can you give an example? > Also, it adds a very big dependency to distribute with your game if you want to bundle the deps or link statically, so the binary doesn't break in a few years when distributions will stop packaging Gtk+3. Since distributions are still shipping Gtk+ 2, I doubt that this will happen "in a few years".
- seba_dos1 9y agoNo need for Gtk+ on Plasma Mobile phones, for example. Gtk+2 has some major apps like Gimp that ensure that it's here to stay for a while. Gtk+3's life will sure be shorter, more like Qt4's. Anyway, it doesn't matter. There is no need for Allegro to link with Gtk+ by default, period. Just like mpv, just like SDL, just like many other apps and libraries that don't need a regular toolkit. For some it might be even hard to integrate the glib's mainloop. "You should use Gtk+" in CSD discussion is just a display of arrogance.