wmww / gtk4-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol and GTK4
MIT License
128 stars 4 forks source link

Make it work on X11 also #5

Closed lestcape closed 1 year ago

lestcape commented 1 year ago

Please understand that hereafter when I mention Wayland, that means Wayland + wlr-layer-shell.

We are using gtk4-layer-shell because it help us to deal with certain shortcomings that we cannot solve with Gtk in Wayland by default, that by decision of the developers of these software. But for my point of view, we (as a client/user of gtk4-layer-shell) really don't want to know if we are on Wayland or X11 or waverer we are, we only want to have a way to create our desktop widgets. So, in this scenario the compositor that is handled our windows should be only an implementation detail.

My idea is that gtk4-layer-shell should be a library that isolate the complexity of the compositor and provide in a transparent way (one supported for Wayland and X11 simultaneously) something to create the desktop widgets we wanted. The result of both scenarios (X11 or Wayland) should be the same and transparent, the implementation of course not.

This should be similar as how Gtk4 is where the compositor is transparent for the user of the library.

That in my opinion will help to reduce the enforce of clients and will make our code much much cleaner and maintainable.

A-Cloud-Ninja commented 1 year ago

A project like that would be better suited to be made with GTK, and thusly using gtk{4}-layer-shell as a wlroots backend, and whatever the protocol for doing so on X would be, as the x11 backend. It seems wildly out of scope for a project targeting the protocol wlr-layer-shell to target something other than wlroots compositors in general.

wmww commented 1 year ago

This is indeed theoretically possible,but out of scope. Someone could write a library that implements the X11 bits itself and uses gtk4-layer-shell when on Wayland. This would be a useful project, but I'm not going to be the one to build it and it's not going to live in this repository.

lestcape commented 1 year ago

A project like that would be better suited to be made with GTK...

Yes ofcourse and also gtk-layer-shell/gtk4-layer-shell as a whole would be better suited to be made directly in GTK, not externally, but things are that way.

GNOME really not care, you can follow the discussion from where I started following it: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/713 Here, 3 years later and 3 external developers later the things are at same in Gtk.