Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[META] Wayland #17310

Open
9 tasks
ColinKinloch opened this issue Dec 29, 2024 · 1 comment
Open
9 tasks

[META] Wayland #17310

ColinKinloch opened this issue Dec 29, 2024 · 1 comment
Labels
feature request New enhancement to RetroArch.

Comments

@ColinKinloch
Copy link
Contributor

ColinKinloch commented Dec 29, 2024

Tasks

Here are some things I've been thinking about regarding wayland, I may add more if they occur to me.

  • Don't destroy wl_display and wl_surface until quit
    Currently gfx drivers are destroyed on core launch and fullscreen transitions.
    This would allow the splash screen to be displayed on launch rather than on fullscreen and core transitions.
    Currently the android keeps it's surface as a single surface is provided on application launch. It does this will a global if I recall correctly. Maybe window management should be split out of the gfx driver.

  • xdg_toplevel configure events should stored until the xdg_surface configure at which point they're applied and acked
    I think is handled correctly by libdecor but without libdecor currently RetroArch just acks the configure.

    static void xdg_surface_handle_configure(
    void *data, struct xdg_surface *surface,
    uint32_t serial)
    {
    xdg_surface_ack_configure(surface, serial);
    }

  • Bumb protocol versions
    This can require implementing new event handlers, some of which are okay to ignore. However it can also require larger changes.

  • Use wl_event_queue to decouple display and input threads
    I'm not sure this would achieve anything.

  • Drag and drop wayland: Open content from drag and drop #16443
    My attempt at implementing this crashes RetroArch and depends on glib for URI decoding.

  • wp_presentation

  • wp_color_manager

  • Rewrite wl_output structs

  • xdg_toplevel_icon

Testing strategy

Run nested kwin (env WAYLAND_DISPLAY=wayland-1):

kwin_wayland --xwayland --no-lockscreen  --width 1920 --height 1080 --output-count 2

--output-count 2 will cause retroarch to show a splash screen. --output-count 1 will forego the splash screen.

Run nested mutter (env WAYLAND_DISPLAY=wayland-1):

MUTTER_DEBUG_DUMMY_MODE_SPECS=1920x1080 dbus-run-session -- mutter --nested --wayland

Run with limited CPU, useful for debugging race conditions:

systemd-run --user --pty --same-dir -p CPUQuota=1% --setenv=WAYLAND_DISPLAY=wayland-1 ./retroarch

Build without libdecor for testing raw xdg-toplevel implementation:

./configure --enable-debug --disable-libdecor
@ColinKinloch ColinKinloch added the feature request New enhancement to RetroArch. label Dec 29, 2024
@Sunderland93
Copy link
Contributor

Is commit-timing-v1 and fifo-v1 protocols also relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New enhancement to RetroArch.
Projects
None yet
Development

No branches or pull requests

2 participants