Hi,

For the long term solution I would ditch Gtk and use libwayland directly.

Inspiration can come from:
https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gdk/wayland/gdksurface-wayland.c

For the short term solution, maybe remove the usage of X11 specific
functions and replace for existing Gdk ones and let it handle.
By letting gdk handle it it would be necessary to bump up the min required
version, so maybe bundle it with javafx.

The long term solution is interesting because:
* We have the full power of anything supported on wayland;
* Gtk is a full toolkit.


- Cheers







Em ter., 10 de ago. de 2021 às 12:45, Kevin Rushforth <
kevin.rushfo...@oracle.com> escreveu:

> Johan can comment on the details, but I think that is a matter of
> investigation.
>
> As with the AWT work which is under discussion, there are two related,
> but different deliverables that should be looked at:
>
> 1. Running the existing JavaFX GTK port on Wayland in X11 compatibility
> mode
> 2. A native JavaFX Wayland port
>
> For both of them, we need a solution to the same "robot" problems that
> AWT and other libraries face (there is no standard way to control the
> mouse or to read pixels from the screen).
>
> The fact that we already use GTK for most things should make #2 easier,
> and it might be able to share a lot of the code, but it very likely will
> need to be its ow backend, since it can't use X11.
>
> In thinking out loud, one thing to consider might be to have a single
> glass GTK platform with different native libraries for Wayland and X11,
> since we already have that support to handle gtk2 and gtk3. Maybe
> something like:
>
> gtk2 (legacy and only for X11)
> gtk3-x11
> gtk3-wayland
> gtk4-x11
> gtk4-wayland
>
> Not sure whether that makes sense or not.
>
> I imagine that 1 should be feasible in the JavaFX 18 time frame. A
> native Wayland port will be a lot of work, but since JavaFX already uses
> GTK for most things, it should be significantly less work than AWT will be.
>
> -- Kevin
>
>
> On 8/10/2021 8:24 AM, Thiago Milczarek Sayão wrote:
> > Hi Johan,
> >
> > Would you prefer a pure Wayland backend or support it with gdk/GTK on top
> > of the current glass backend?
> >
> > Cheers
> >
> > Em ter, 10 de ago de 2021 07:52, Johan Vos <johan....@gluonhq.com>
> escreveu:
> >
> >> I think we (everyone committing/reviewing in openjdk/jfx) did a great
> job
> >> with the 17-work: an impressive amount of old and annoying bugs are
> fixed.
> >> For 18 and beyond, I believe we have to keep working on those old
> issues --
> >> at least if they are still relevant.
> >> Also, I am 100% ok with the list of issues Kevin mentioned that need to
> be
> >> moved forward now.
> >>
> >> Apart from that, I want to have support for Metal and Wayland in JavaFX
> 18.
> >>
> >> - Johan
> >>
> >> On Fri, Jul 30, 2021 at 2:58 PM Kevin Rushforth <
> >> kevin.rushfo...@oracle.com>
> >> wrote:
> >>
> >>> Now that JavaFX 17 is in RDP2, we can turn more attention to bug fixes
> >>> and enhancement requests for JavaFX 18. It's the summer, so there may
> be
> >>> delays as some people are out at various times (including me), but I
> >>> would like to get some of the outstanding enhancement requests moving
> >>> over the next few weeks.
> >>>
> >>> Specifically, I'd like to see the following proceed:
> >>>
> >>> * Transparent backgrounds in WebView
> >>> JBS: https://bugs.openjdk.java.net/browse/JDK-8090547
> >>> PR: https://github.com/openjdk/jfx/pull/563
> >>>
> >>> * Add DirectionalLight
> >>> JBS: https://bugs.openjdk.java.net/browse/JDK-8234921
> >>> PR: https://github.com/openjdk/jfx/pull/548
> >>>
> >>> * CSS pseudoclasses :focus-visible and :focus-within
> >>> https://bugs.openjdk.java.net/browse/JDK-8268225
> >>> PR: https://github.com/openjdk/jfx/pull/475
> >>>
> >>> * Improve property system to facilitate correct usage (minus the binary
> >>> incompatible API change)
> >>> JBS: https://bugs.openjdk.java.net/browse/JDK-8268642
> >>> PR: https://github.com/openjdk/jfx/pull/590 (Draft)
> >>>
> >>> And maybe the following:
> >>>
> >>> * Add CSS themes as a first-class concept (need a consensus on how to
> >>> proceed)
> >>>
> >>> * Undecorated interactive stage style (still in early discussion, but
> >>> the concept looks interesting and useful)
> >>>
> >>> There are probably others I'm forgetting.
> >>>
> >>> Each of the above should be discussed in their own thread on
> openjfx-dev
> >>> rather than a reply to this thread.
> >>>
> >>> -- Kevin
> >>>
> >>>
> >>>
>
>

Reply via email to