Cannot cycle fullscreen and modify geometry properties in the same function in a Lua script
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv Information
mpv v0.40.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
built on Sep 5 2025 15:11:06
libplacebo version: v7.354.0 (v7.351.0-67-g515da95-dirty)
FFmpeg version: n7.1.1-57-g1b48158a2
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
- Windows version: Windows 10, version 22H2 (OS Build 19045.6466)
- GPU model, driver and version: Nvidia GTX 1070 - Driver version 560.95
- Source of mpv: https://www.videohelp.com/software/mpv-media-player
- Latest known working version:
- Issue started after the following happened: It never worked for me.
Reproduction Steps
I used a script only with the test function provided in the original issue: https://github.com/mpv-player/mpv/issues/14005#issuecomment-3565020006
I removed all other scripts from my "scripts" folder.
Changing the order of the commands, in the function, does not change the behaviour.
It also does no work with "cycle" fullscreen.
There are no error messages in the console.
Test function:
function do_stuff()
mp.commandv("set", "fullscreen", "no")
mp.commandv("set", "geometry", "500x500")
end
mp.add_key_binding("v", "do-stuff", do_stuff)
Expected Behavior
- Leave Fullcreen
- Change window geometry to 500x500
Actual Behavior
mpv 0.40.0 ( stable - portable )
- It does not leave Fullscreen
- But the underlying geometry is changed, because if I leave fullscreen afterwards ( with the regular key ), I can see the geometry changed to 500 x 500
This also happens using the PIP button in the mpv-osc-tethys script as I mentioned in the original issue.
mpv 0.32.0 ( stable - portable )
I also tried in my older version ( from the same source ), before the fix from the original issue.
It also does not work, but the behavior it's different:
- It does not leave Fullscreen.
- But it does not change the geometry
Log File
You'll notice that my portable mpv 0.40.0 is in a folder named "mpv-0.32.0-x86_64"
But that's not related to this issue.
I put the new portable install in the old folder, so that Windows can open videos with the new mpv version ( on double click ), without having to mess with the Windows Registry.
( If I knew this back then, I would have chosen a different name for this folder, before adding mpv to the "open with" list ... )
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the do_stuff Lua reproduction using mp.commandv("set", "fullscreen", "no") followed by the geometry change, then review the attached log file for the fullscreen and geometry handling. The fix is complete when the same function leaves fullscreen and applies the 500x500 geometry, including when fullscreen is cycled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100