libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.24k stars 1.83k forks source link

[Question] Real fullscreen on Wayland #16218

Closed vanfanel closed 8 months ago

vanfanel commented 8 months ago

Hi,

I have been trying to make RetroArch run as a real, exclusive fullscreen program, instead of using a "maximized window".

On Settings->Video->Fullscreen Mode, I have Windowed Fullscreen Mode disabled, so the RetroArch window should be a true, exclusive fullscreen window. But it is not: it allows me to swap between windows (ALT+TAB), which indicates it is, indeed, a windowed fullscreen window.

So, maybe RetroArch doesn't do real exclusive fullscreen windows on Wayland?

Or maybe my wl-roots based compositor (labwc) doesn't support exclusive fullscreen windows?

@ColinKinloch @zoltanvb Can you shed some light here, please?

ColinKinloch commented 8 months ago

I assume by "real" you're looking for mode setting. In which case I don't think it's something that wayland allows clients to do.

This is a good reference for what wayland clients can do: https://wayland.app/protocols/ You can see compositor support for each protocol at the bottom of the page.

If you're looking for more detail/rationale for a protocol there are good discussions in the MR's https://gitlab.freedesktop.org/wayland/wayland-protocols The SDL source is also a good reference, it doesn't seem to differentiate SDL_WINDOW_FULLSCREEN_DESKTOP.

It could be that DRM lease could provide something interesting, but that would be pretty involved.

You should look for a application that has the behaviour you're looking for and look at the code.

zoltanvb commented 8 months ago

As I checked, there is a thing called fullscreen unredirect, which can bypass the compositor when the whole screen is covered, but it seems to be automatic without explicit enable/disable.

Mode setting (resolution / refresh rate change) is not available, this discussion mentions a few options, I believe RetroArch uses none of these.

vanfanel commented 8 months ago

Thanks guys. I had a discussion with the labwc compositor authors, and got some compositor logs that show how RetroArch fares on Wayland with regards to Direct-scanout. Long story short: RetroArch works perfect and goes into Direct-Scanout mode as expected. If you are interested:

https://github.com/labwc/labwc/discussions/1518#discussioncomment-8429004

I am closing this. Thanks for passing by and commenting on this relatively obscure matter!