ffplay fails to restore window position correctly upon toggling 'maximize'
Version info: SDL2 2.30.6, from Arch linux package sdl2-2.30.6-1.
Summary: Toggling the ffplay 'maximize' function (e.g., by typing 'f' twice) does not restore the window to its original position; the restored position is offset by (dx, dy), where dx and dy are the width and height of the window decorations.
I reported this on the ffmpeg tracker
https://trac.ffmpeg.org/ticket/11051
A dev there suggested it was probably not their issue, and to check it against an older version of SDL2. I tried 2.0.10, and found that the observed behavior did not occur, so refiling the report here. See above ffmpeg ticket for how to reproduce.
Can bisect further between 2.0.10 and 2.30.6 if it's of use to you.
Did not see any existing open issue that looked identical, although there are a few resize-related issues that are perhaps related.
Yes, bisecting would be helpful, thanks!
OK, I will take that on next weekend, does that timeframe work for you?
Sure, no rush.
Doing bisection now, but the build is painfully long (~15 mins on my setup). Wondering if you can suggest some configure(1) options that might get me to a faster minimal build for my setup (commodity X86_64 laptop, Arch, Xorg server)? That would save me some time.
I did look thru the ./configure --help "Optional Features" section, but alas, being a certified SDL-moron, I'm not really sure what to eliminate (other than some of the obvious ones such as disabling Wayland, but that saves very little build time.)
You should be able to do a bisect just on SDL, not on ffmpeg.
That's what I am doing, just building SDL2 by itself and testing it with my existing ffplay/ffmpeg. The SDL2 build takes ~15 minutes (a few mins less without Wayland).
I've narrowed it down to somewhere after 2.24.2 so far.
OK, bisection completed. The problem manifests itself first in 2.27.1 (which is notated in your "Releases" list as 2.28.0 RC1):
https://github.com/libsdl-org/SDL/releases/tag/prerelease-2.27.1 # First failing version
Previous version in the "Releases" list is 2.26.5, in which the problem does not occur.
Hth.
@slouken FYI: I just checked the status of this issue using ffplay linked against libSDL2-2.0.so.0.3200.56 (the latter as supplied by Arch linux package sdl2-compat 2.32.56-1).
The original issue -- drifting window position upon toggling 'maximize' -- no longer occurs: The original window position now remains constant upon cycling 'maximize' via the ffplay 'f' key, as desired.
Unfortunately though, it seems that a new form of undesired behavior has been introduced into the 'maximize' toggling operation, and it is intermittent rather than deterministic: Occasionally, when the window is toggled from the maximized size back to the original (reduced) size, the reduced window does not display a smaller version of the entire image, as expected; instead, the reduced-size image consists of the lower-left corner of the maximized image. In other words, when this happens, the image in the reduced window is effectively a clipped version of the maximized view, rather than simply a reduced-size view of the entire image.
On my setup, the above-described behavior is intermittent, occuring roughly 10% to 20% of the time upon toggling back to the original image size.
If you would prefer, I can close the original issue (since that behavior does indeed seem to have been fixed) and open a new issue describing this new behavior. Let me know.
Yes, please close this and enter a new issue.
@slouken Done. New issue #13262.