Retroarch: Wayland: resizing on HiDPI trails the cursor by 2x, fullscreen broke

Created on 31 Dec 2018  Â·  16Comments  Â·  Source: libretro/RetroArch

Description

In the current git master:

  • fullscreen mode doesn't work at all, RetroArch just instantly closes (at least on Weston)
  • UI scaling was finally fixed (#6554) yay..

    • but that (?) introduced a regression in window resizing (at least when a HiDPI screen is present): now the window doesn't follow the resize cursor, it's trailing behind by 2x (ish) and the only way to get a large window is to move it off screen to the top left corner and resize from there.

I recorded a video of the resizing behavior: https://unrelentingtech.s3.dualstack.eu-west-1.amazonaws.com/retroarch-wayland-resize.webm

While in 1.7.5:

  • fullscreen mode worked fine with OpenGL, was glitched with Vulkan
  • resizing worked correctly

Version/Commit

You can find this information under Information/System Information

  • RetroArch: bb5cd1dfeb55d94eb7ed84983227d8056997b55f

Environment information

  • OS: FreeBSD 13-CURRENT
  • Compositor: Weston git master
  • Compiler: clang 7
bisected wayland

All 16 comments

Can you please use git to bisect the issue and find the first bad commit?

It's #7607.

c32c98e667 itself doesn't actually build (linker complains about duplicate symbols), but that makes sense, it's the xdg-shell implementation that has the bug

@Sunderland93 Any ideas about this issue?

Okay, I fixed the resizing part: #7855

upd: and #7857

hm, fullscreen now works when starting already in fullscreen mode with GL. Going from window to fullscreen quits the app though.

Vulkan in fullscreen mode quits with

xdg_wm_base@11: error 4: xdg_surface buffer does not match the configured state

https://github.com/wayland-project/weston/commit/c84423baeaf669d80a87121d1aceb4cade85ce8f

also looks like a size issue.

UPD: that was easy

The glitched output in fullscreen+Vulkan might be a Weston issue actually: it does not show up on screenshots, only on the actual monitor.

I fixed the Vulkan+HiDPI issues: #7857

So the only remaining problem is that switching from windowed to fullscreen (via hotkey) causes the app to quit.

Currently, I have no idea how to solve this problem, but I have suspicions about what might be the case ...

Latest RetroArch-master now crashes the Rootston with segfault. Only if started in fullscreen mode

weird, on Weston it's the opposite — works when started in fullscreen mode, but dies when pressing the hotkey to go fullscreen from windowed (on OpenGL only)

oh rootston crashes, I see. Sway doesn't crash, actually. I'll fix rootston

Also, looks like libwayland-server (on the rootston side) says error in client communication when changing between windowed and fullscreen, so there's clearly a bug, even if it works on rootstron

SardemFF7   sunderland93: may be related, maybe not, but wl->resize is never set to false, AFAICT

IOW: the first step is probably to check every single place the shell protocols are used to make sure they are actually used when they should :-)

The problem is correctly resize xdg_toplevel. For example https://github.com/videolan/vlc/blob/b41b469a3f41a6d38ed9da2abcf2617029d740b6/modules/video_output/wayland/xdg-shell.c#L178

@myfreeweb did you find a solution?

no

Hm, adding wl_egl_window_resize(wl->win, width, height, 0, 0); in handle_toplevel_config solve fullscreen issue for me, but I'm not sure that this is the right decision.

Was this page helpful?
0 / 5 - 0 ratings