Gtk4 and Wayland

Mario Torre neugens at redhat.com
Wed Sep 1 11:26:34 UTC 2021


On Wed, Sep 1, 2021 at 1:18 PM Johan Vos <johan.vos at gluonhq.com> wrote:
>
> Hi Thiago,
>
> I was thinking (and experimenting) in the same direction, and so far that
> is working good. I don't see disadvantages, but it would be good to find
> out about it before we move forward.
> Maybe the main issue to me is that GTK comes with lots of dependencies. We
> already have that situation today, so it is not going to be worse. But if
> we would use the Wayland protocol on a lower level (with a Wayland-specific
> glass platform, instead of GTK), we could probably reduce the dependencies.
> However, this comes at the price of creating *and maintaining* more
> low-level code.
>
> I've been running GTK3 on Wayland and that works fine too. However, it
> might be better to focus Wayland support for GTK4. I think there won't be
> many installs that have no X11, but only Wayland, and that have GTK3 and no
> GTK4.

I tend to agree with you, I think we should consider this for Wakefield too.

Cheers,
Mario

> - Johan
> - Johan
>
> On Tue, Aug 31, 2021 at 11:03 PM Thiago Milczarek Sayão <
> thiago.sayao at gmail.com> wrote:
>
> > Hi,
> >
> > I did some investigation on gtk4 and wayland.
> >
> > After some research I ended up with the conclusion that the best way is to
> > do a separate gtk4 backend, that would support X11 and Wayland.
> >
> > This would be a good start:
> > https://github.com/openjdk/jfx/pull/77/files
> >
> > Why?
> >
> > Gtk4 moves the decoration to the client side, which is GREAT since knowing
> > the window size with decoration was a real pain.
> >
> > We probably won't want to do all the decoration work, Gtk does that, but on
> > GtkWindow level, not GdkSurface (which replaces GdkWindow).
> >
> > Thus the move to use "more Gtk" (hence "less Gdk") which is exactly what
> > the PR does. It also removes Applet code
> >
> > This is also a good starting point:
> > https://gnome.pages.gitlab.gnome.org/gtk/gtk4/migrating-3to4.html
> >
> > --Thiago.
> >
>


-- 
Mario Torre
Manager, Software Engineering, core OpenJDK
Red Hat GmbH <https://www.redhat.com>
9704 A60C B4BE A8B8 0F30  9205 5D7E 4952 3F65 7898



More information about the openjfx-dev mailing list