Skip to content

Platform support: Linux 🐧 #17

@doceazedo

Description

@doceazedo

WRY provides Linux support using WebKitGTK, and a base implementation has already been added to the Godot WRY codebase. However, this implementation does not work at all, because WebKitGTK requires a GTK window, whereas Godot creates its own window.

Possible solutions

I have come down to a few possible solutions:

  1. Render the webview in a separate window as an overlay

    • ✅ Can selectively enable/disable inputs on the overlay
    • ⚠️ Only works for windowed and windowed fullscreen games
    • ⚠️ Would require handling input forwarding if interaction with the game needs to continue while the overlay is active
    • 🚨 Recording/sharing the game window would not include the webview (dealbreaker!)
    • 🔗 Overlayed's source code may come in clutch here
  2. Render the webview offscreen and use it as a dynamic texture

    • ✅ Common solution for game webviews
    • ✅ Enables embedding webviews inside a 3D world
    • ⚠️ Should be doable, but is not supported out of the box (see Offscreen rendering feature  tauri-apps/wry#391)
    • ⚠️ Requires manual handling of input events
    • 🔗 Bevy Webview implemented this (Linux-only)
  3. Bypass Godot’s window creation and provide a custom GTK window with Vulkan context

    • ✅ Would achieve the very same level of support we currently have for the other platforms
    • ✅ Could allow integration of other GTK widgets, not just webviews
      • This is definetly out of the scope of this project, but might lead to a very interesting separate extension
    • ⚠️ Might be very complex to implement
    • 🔗 Reference: Godot Forum Discussion

Next steps

Any further discussions, research, discoveries, or contributions toward implementation are highly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions