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

floating mpv window flickers and changes position when resizing #7501

Open
llyyr opened this issue Mar 10, 2023 · 9 comments
Open

floating mpv window flickers and changes position when resizing #7501

llyyr opened this issue Mar 10, 2023 · 9 comments
Labels
bug Not working as intended

Comments

@llyyr
Copy link
Contributor

llyyr commented Mar 10, 2023

  • Sway Version:
    • sway git

Video: https://0x0.st/HiBi.mp4

How to reproduce: start mpv with --no-config as a floating window, and try to resize to 0x0 or like in the video

Original issue here mpv-player/mpv#11435

The mpv window does nothing besides try to keep the aspect ratio when resizing, I don't know of any other client that wants to do that so I can't say if it's just mpv or any application that wants to keep a certain aspect ratio...

wayland_debug.log

@llyyr llyyr added the bug Not working as intended label Mar 10, 2023
@anpandey
Copy link
Contributor

anpandey commented Mar 12, 2023

Resizing a floating mpv horizontally, the height seems to briefly jump to what it's supposed to be:

[1044195.253]  -> [email protected]_configure(40006)
[1044209.143] [email protected](433, 670, array[8])
[1044209.149] [email protected](40007)
[1044209.151]  -> [email protected]_configure(40007)
[1044409.391] [email protected](422, 670, array[8])
[1044409.428] [email protected](40008)
[1044409.436]  -> [email protected]_configure(40008)
[1044414.098] [email protected](422, 317, array[8])  <-----
[1044414.107] [email protected](40009)
[1044414.111]  -> [email protected]_configure(40009)
[1044416.822] [email protected](421, 670, array[8])
[1044416.830] [email protected](40010)
[1044416.834]  -> [email protected]_configure(40010)
[1044423.580] [email protected](421, 670, array[8])
[1044423.585] [email protected](40011)

Could be related to #5266. However, it doesn't look like mpv uses set_window_geometry.

@anpandey
Copy link
Contributor

The same problem is mentioned in #7195 (comment). sway ends up setting the size in two different places:

  • handle_pointer_motion commits the new size of the container based on the position of the pointer. However, it only uses the size of the container when the resize op began (and ignores any enforcement of aspect ratio mpv might be doing)
  • As a consequence the commit handler detects the updated size, and creates a new transaction with the proper size based on the surface even though the first transaction hasn't been applied yet.

@uncomfyhalomacro
Copy link

Seems to be a wlroots issue. since it also affects riverwm

@llyyr
Copy link
Contributor Author

llyyr commented Mar 30, 2023

No, it's a sway/river issue and it's fixed on river already but the fix is unreleased riverwm/river@9db4111

@uncomfyhalomacro
Copy link

No, it's a sway/river issue and it's fixed on river already but the fix is unreleased riverwm/river@9db4111

I will check if i have the patch put on opensuse factory. 🤔

@uncomfyhalomacro
Copy link

uncomfyhalomacro commented Mar 30, 2023

No, it's a sway/river issue and it's fixed on river already but the fix is unreleased riverwm/river@9db4111

tested it. it's neither a wlroots issue nor a wayland issue (it can be) since it also happens in GNOME or KDE Plasma Wayland

@llyyr
Copy link
Contributor Author

llyyr commented Mar 30, 2023

It doesn't happen in river patched with that commit, or on Weston (according to upstream issue), or on KDE/Gnome. Are you sure you're experiencing the same issue?

@uncomfyhalomacro
Copy link

uncomfyhalomacro commented Mar 30, 2023

It doesn't happen in river patched with that commit, or on Weston (according to upstream issue), or on KDE/Gnome. Are you sure you're experiencing the same issue?

Nvm it was another issue. It's this one mpv-player/mpv#11420. i read this issue wrong

@llyyr llyyr changed the title floating mpv window flicks and changes position when resizing floating mpv window flickers and changes position when resizing Aug 14, 2024
@llyyr
Copy link
Contributor Author

llyyr commented Aug 14, 2024

Partially fixed by #8295 and the corresponding wlroots change, now the SSD (borders) is always correct at least. The window however still flickers while you're resizing and can change position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

3 participants