Why GTK4 glass backend will not (probably) be an #IFDEF

Thiago Milczarek Sayão thiago.sayao at gmail.com
Sat Aug 14 21:41:06 UTC 2021


Gtk4 glass implementation will probably be a new glass implementation
based on the current one because there are too many "breaking"
changes.

Changes are listed here:
https://docs.gtk.org/gtk4/migrating-3to4.html

Specially note:
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkwindow-api-changes (*)
https://docs.gtk.org/gtk4/migrating-3to4.html#stop-using-gtk_widget_set_app_paintable
 (*)
https://docs.gtk.org/gtk4/migrating-3to4.html#stop-using-grabs
https://docs.gtk.org/gtk4/migrating-3to4.html#stop-using-non-rgba-visuals
https://docs.gtk.org/gtk4/migrating-3to4.html#switch-to-the-new-drag-and-drop-api

* Gdk Surface would be used instead of Gtk Window.

Backend (Wayland/X11) specific functions will be needed:
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-monitor-api-changes
https://docs.gtk.org/gdk4/wayland.html

Looking at the Gdk4 implementation, using libwayland* directly would
be nice, but simply too hard. So we could use Gtk4 to support wayland
and #ifdef GDK_WINDOWING_X11 / GDK_WINDOWING_WAYLAND where necessary.

On another note, XTest equivalent (for Robot) is not available on
generic wayland compositors.

-- Thiago.


More information about the openjfx-dev mailing list