<div dir="ltr">Hi,<br><div><br></div><div>It seems there are some opportunities to explore with Wayland:</div><div><br></div><div>For kiosks (Ubuntu frame):</div><div><a href="https://mir-server.io/">https://mir-server.io/</a></div><div><br></div><div><a href="https://wayland.app/protocols/">https://wayland.app/protocols/</a><br></div><div>There are some interesting extensions such as Tizen (samsung OS) and "In-vehicle infotainment": <a href="https://wayland.app/protocols/ivi-application">https://wayland.app/protocols/ivi-application</a><br></div><div>I found it interesting because of the Wayland adoption for those scenarios.</div><div><br></div><div>I'm doing some experiments and it seems to fit well using wayland-client directly.</div><div><br></div><div>I was thinking about keeping GTK for system dialogs such as file open - but it can be done with DBUS and xdg-desktop-portal. So if the user is on KDE it will display a KDE file open dialog:</div><div><a href="https://flatpak.github.io/xdg-desktop-portal/docs/">https://flatpak.github.io/xdg-desktop-portal/docs/</a>. Same for "Settings".<br></div><div><br></div><div>xdg-desktop-portal also has interfaces for "RemoteDesktop" which I think can be used for Robot (to simulate as if it was using RDP and send cursor movements and keys).</div><div><br></div><div> -- Thiago</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sex., 10 de nov. de 2023 às 09:43, Thiago Milczarek Sayão <<a href="mailto:thiago.sayao@gmail.com">thiago.sayao@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Johan,<div><br></div><div>Robot will be a challenge.</div><div><br></div><div>For mouse and keyboard simulation this could work:</div><div><a href="https://www.kernel.org/doc/html/v4.12/input/uinput.html" target="_blank">https://www.kernel.org/doc/html/v4.12/input/uinput.html</a><br></div><div><br></div><div>of maybe:</div><div><a href="https://docs.flatpak.org/pt-br/latest/portal-api-reference.html#gdbus-org.freedesktop.portal.RemoteDesktop" target="_blank">https://docs.flatpak.org/pt-br/latest/portal-api-reference.html#gdbus-org.freedesktop.portal.RemoteDesktop</a><br></div><div><br></div><div>For screenshot:</div><div><a href="https://docs.flatpak.org/pt-br/latest/portal-api-reference.html#gdbus-org.freedesktop.portal.Screenshot" target="_blank">https://docs.flatpak.org/pt-br/latest/portal-api-reference.html#gdbus-org.freedesktop.portal.Screenshot</a><br></div><div><br></div><div>Haven't tested anything yet.</div><div><br></div><div>I did some experiments on the jfx-sandbox (it displays the window on wayland with software rendering), but the conclusion so far is that it's better to ditch gtk and use wayland-client directly, except for system dialogs such as file open.</div><div><br></div><div>-- Thiago.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sex., 10 de nov. de 2023 às 06:39, Johan Vos <<a href="mailto:johan.vos@gluonhq.com" target="_blank">johan.vos@gluonhq.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Thiago,<div><br></div><div>Thanks for the work on Wayland. I spent some time on it in the past as well, and I'll hope to find some time to look at your work soon.</div><div><br></div><div>The main worry I had in the past was how to deal with the robot, where we need to get pixels from the screen -- did you tackle that?</div><div><br></div><div>- Johan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 3, 2023 at 1:14 AM Thiago Milczarek Sayão <<a href="mailto:thiago.sayao@gmail.com" target="_blank">thiago.sayao@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><div><br></div><div>About Wayland:</div><div><br></div><div>Porting es2 to use EGL instead of GLX is pretty straightforward, so converting a X11GL* to WaylandGL* is easy (GLX is X11 only, so this is why EGL is needed).</div><div>The problem is Gtk4 and/or Gtk3 with Wayland won't allow you to paint directly to the window as es2 do.</div><div>I've tried to use Gtk4 and composite it with a GL texture - it would work, but does't fit well with es2 as it is designed to swapBuffers.</div><div><br></div><div>I'm looking for the shortest path to get it working.</div><div><br></div><div>I'm thinking now to use wayland-client directly for most things, so it will be possible to create the WaylandGL* infrastructure and render directly to a surface.</div><div>Compositing directly with wayland would be better anyways. Using Gtk (3 or 4) would require rendering somewhere else (other than onscreen wayland surface) and then composite the result with Gtk.</div><div><br></div><div>So, the conclusion for now is that Gtk won't work with wayland for the use of another toolkit (outside of the gtk rendering scope).</div><div><br></div><div>wayland-client, here I go.</div><div><br></div><div>-- Thiago.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sáb., 21 de out. de 2023 às 18:12, Thiago Milczarek Sayão <<a href="mailto:thiago.sayao@gmail.com" target="_blank">thiago.sayao@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">EGL is the way to go for Linux on Wayland and X11. <div dir="auto"><br></div><div dir="auto">I don't know how to do it yet, but it seems the solution is to use DMABUF with EGL and share it with GTK (I suspect on a GtkGLArea widget, but not sure yet).</div><div dir="auto"><br></div><div dir="auto">Firefox and WebKit GTK uses the same technic.</div><div dir="auto"><br></div><div dir="auto">Gtk4 does not allow application painting, so direct surface context is not possible.</div><div dir="auto"><br></div><div dir="auto">We are using gtk3 and it is still possible, but I want to use GtkHeaderbar and clean up glass code. Since it means sharing the window/surface with GTK, direct surface rendering also doesn't work.</div><div dir="auto"><br></div><div dir="auto"><a href="https://mozillagfx.wordpress.com/2021/10/30/switching-the-linux-graphics-stack-from-glx-to-egl/" target="_blank">https://mozillagfx.wordpress.com/2021/10/30/switching-the-linux-graphics-stack-from-glx-to-egl/</a></div><div dir="auto"><br></div><div dir="auto"><a href="https://blogs.igalia.com/carlosgc/2023/04/03/webkitgtk-accelerated-compositing-rendering/" target="_blank">https://blogs.igalia.com/carlosgc/2023/04/03/webkitgtk-accelerated-compositing-rendering/</a></div><div dir="auto"><br></div><div dir="auto"><a href="https://blog.gtk.org/2021/05/10/adventures-in-graphics-apis/" target="_blank">https://blog.gtk.org/2021/05/10/adventures-in-graphics-apis/</a></div><div dir="auto"><br></div><div dir="auto">It's been nice to learn.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em seg., 16 de out. de 2023 20:51, Thiago Milczarek Sayão <<a href="mailto:thiago.sayao@gmail.com" target="_blank">thiago.sayao@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><div><br></div><div>I am investigating about prism on Wayland.</div><div><br></div><div>It looks like we could just replace the GLX calls on X11 backend to EGL and it will work on both (maybe rename it).<br></div><div><br></div><div>It will need some work to pass the native display around - it assumes X11 Display everywhere and it could be a Display or a wl_display.</div><div><br></div><div>-- Thiago.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em dom., 15 de out. de 2023 às 16:06, Thiago Milczarek Sayão <<a href="mailto:thiago.sayao@gmail.com" rel="noreferrer" target="_blank">thiago.sayao@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><div><br></div><div>Update: It now works on wayland with -Dprism.order=sw</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em dom., 15 de out. de 2023 às 10:49, Thiago Milczarek Sayão <<a href="mailto:thiago.sayao@gmail.com" rel="noreferrer" target="_blank">thiago.sayao@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><div><br></div><div><a href="https://github.com/openjdk/jfx-sandbox/tree/tsayao_wayland" rel="noreferrer" target="_blank">https://github.com/openjdk/jfx-sandbox/tree/tsayao_wayland</a><br></div><div><br></div><div>I did some experiments here. So far, so good.</div><div><br></div><div>1) Replaced GDK events for Gtk Signals - It's the way to go for newer gtk.</div><div>2) Replaced drawing directly in the window and added a GtkDrawingArea with a GtkHeaderBar which allows control over the whole window</div><div>size and allows to get rid of extents* calls - this cleans up a lot.</div><div>3) Unified the WindowContext to clean it up.</div><div><br></div><div>I also integrated the IME replacement proposed here:</div><div><a href="https://github.com/openjdk/jfx/pull/1080" rel="noreferrer" target="_blank">https://github.com/openjdk/jfx/pull/1080</a><br></div><div><br></div><div>It almost runs with software rendering on Wayland, but something still touches X11.<br></div><div><br></div><div><div>To finally make it work on Wayland it requires to implement it on prism es2. I see that there's a EGL part of Monocle. I still don't completely understand it, but wouldn't it work as a drop-in replacement? </div><div><br></div></div><div>-- Thiago.</div><div><br></div><div><br></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>