wmww / gtk-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol
GNU General Public License v3.0
324 stars 16 forks source link

Discussion: A GTK Picture-in-Picture shell library #151

Closed davidedmundson closed 1 year ago

davidedmundson commented 1 year ago

A proposal for PIP shell exists here: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/132

We need some client implementations so I made a GTK library here: https://github.com/davidedmundson/gtk-pip-shell

and then added that into Firefox: image

and can confirm it works nicely.

The work is extremely heavily influenced by the code here.

It needs all sorts of cleanup and polishing before it could be released for actual usage. I'm not a GTK dev so it needs some review by someone more experienced when it's ready. Mostly I wanted to get some discussion going about direction in particular the duplication of gtk-priv which is non trivial code.

Is a single repo of "GTK shells" an idea worth considering?

wmww commented 1 year ago

gtk-priv has always been and will always be an awful idea. I hope it doesn't need to spread to other projects. With the world slowly moving on to GTK 4 (which makes a gtk-priv like approach harder, but potentially makes getting things landed in GTK easier, see #37), I strongly encourage new development efforts to be in the direction of getting better official support in GTK for custom shells.

gtk-layer-shell is essentially in maintenance mode right now, so I don't particularly want to make any major changes to it as long as what I've got is working. Any significant time I did have to spend towards this project (which is currently none) would go to GTK 4 support.

wmww commented 1 year ago

Following up on this, as per https://github.com/wmww/gtk-layer-shell/issues/37#issuecomment-1498783317 I'm actively working on GTK4 support for layer shell. The approach I'm taking of wrapping libwayland calls has turned out to be quite a bit simpler than gtk-priv, and I recommend it if there isn't a better alternative. It should work with both GTK3 and GTK4. There's potential for creating a library to do this we both could use, though I won't put effort towards that until after GTK4 Layer Shell is working and released.

davidedmundson commented 1 year ago

Thanks for following up. The approach certainly looks creative. Don't rush on a library, I need to fight upstream protocols first.