Bug 390747 - Bogus resize events sent to mpv
Summary: Bogus resize events sent to mpv
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.12.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-19 17:48 UTC by Jagannathan Tiruvallur Eachambadi
Modified: 2019-01-03 13:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: Wayland+
mgraesslin: X11-


Attachments
mpv and corresponding wayland events (48.39 KB, text/plain)
2018-02-19 17:48 UTC, Jagannathan Tiruvallur Eachambadi
Details
mpv and corresponding wayland events (weston) (75.64 KB, text/plain)
2018-02-20 09:59 UTC, Jagannathan Tiruvallur Eachambadi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jagannathan Tiruvallur Eachambadi 2018-02-19 17:48:59 UTC
Created attachment 110817 [details]
mpv and corresponding wayland events

To reproduce start mpv like,
> mpv --gpu-context=wayland --fullscreen videofile

Expected result
---
mpv is fullscreen when starting.

Actual result
---
mpv tries to go fullscreen but is limited to the video resolution and there is just blackness in the rest of the screen.

Check the attachment for the logs with WAYLAND_DEBUG=1.

Related to this bug, when mpv is made fullscreen later and you tab switch, the application gets resized but borders are missing and screen is in a similar state as previously described. Tab switching shouldn't cause a resize (that is the behaviour in kwin_x11).
Comment 1 Martin Flöser 2018-02-19 20:40:05 UTC
Can you test the same with weston? From the wayland debug output I don't see any issues. The window is correctly resized to fullscreen and according to the log mpv notices this and scales the video source. Also the buffer is requested in correct size. I don't see what in KWin could cause any problems. Thus I would like to know how other compositors act in this case.
Comment 2 Jagannathan Tiruvallur Eachambadi 2018-02-20 09:59:10 UTC
Created attachment 110837 [details]
mpv and corresponding wayland events (weston)

I cannot reproduce it in weston, attaching the logs.

In the previous log, the interesting part to look at is:
> [889030.075] zxdg_toplevel_v6@15.configure(0, 0, array)
> [vo/gpu/wayland] Resizing due to xdg from 1366x768 to 1280x720
> [889030.125] zxdg_surface_v6@3.configure(38258)
> [889030.139]  -> zxdg_surface_v6@3.ack_configure(38258)
> [cplayer] starting audio playback

These xdg events don't happen in weston.
Comment 3 Martin Flöser 2018-02-20 15:48:09 UTC
Thanks that's a help
Comment 4 Martin Flöser 2018-02-20 19:08:21 UTC
That configure event seems to be in reply to some state changes.
Comment 5 Jagannathan Tiruvallur Eachambadi 2018-02-20 20:17:31 UTC
From my side, mpv is started fullscreen and I don't perform any operation. I don't even see the resize, I think it happens well before the video is rendered.
Comment 6 Martin Flöser 2018-03-04 14:45:16 UTC
Unfortunately the mpv version my distribution provides doesn't provide xdg-shell support yet. Thus I cannot really investigate.
Comment 7 David Edmundson 2019-01-03 13:02:59 UTC
Sending null configure event sizes should be fixed in master/5.15.
Testing opening fullscreen worked here.

Please reopen if there's still an issue