Skip to content

[X11] mpv reset window position #16178

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

Open
6 tasks done
tupo2 opened this issue Apr 3, 2025 · 2 comments
Open
6 tasks done

[X11] mpv reset window position #16178

tupo2 opened this issue Apr 3, 2025 · 2 comments

Comments

@tupo2
Copy link

tupo2 commented Apr 3, 2025

mpv Information

mpv v0.40.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0
FFmpeg version: 7.1.1-1+b1
FFmpeg library versions:
   libavcodec      61.19.101
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100

Other Information

- Linux version: Debian unstable
- Kernel Version: 6.12.21-1
- GPU Model: Radeon RX 7600
- Mesa/GPU Driver Version: 25.0.2-1
- Window Manager and Version: Openbox 3.6.1
- Source of mpv: Debian repository
- Latest known working version: 0.39.0
- Issue started after the following happened: Play a media

Reproduction Steps

Set --geometry, move the window and play a media.

Expected Behavior

Keep mpv window position even when the --geometry options is used.

Actual Behavior

I set a position with --geometry, but if I move the window and play a media, the window go back to it's default position.
I tried --force-window-position but it's same.

The issue appears only if --geometry is used, does not happen on v0.39.0.

Log File

mpv --no-config --force-window --idle --geometry=+50%+50% --log-file=mpv_log.txt --gpu-debug
Then moved the window, played a FLAC file and left.

mpv_log.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@Dudemanguy
Copy link
Member

Dudemanguy commented Apr 4, 2025

So this is different behavior from before, but at the same time it's more consistent. Previously, setting --geometry would resize the window on a new file. If anything, the position being ignored in the case of setting xy coordinates was a bug. I'm not sure what currently happens on other platforms though.

If you don't want it to do that, you can of course just clear the --geometry option value.

@kasper93
Copy link
Member

kasper93 commented Apr 4, 2025

I'm not sure what currently happens on other platforms though.

FYI, I refactored window sizing/positioning on Windows. I still have one or two corner cases to fix I think, maybe will have time too look at this in few days. There were some bugs in common code too. I didn't change the actual geometry handling though, but during testing noticed that it is inconsistent with say autofit, but I don't have much detail, because this would be my next step to look at the common code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants