fullscreen=yes on GNOME Wayland restores to top-left tiny window after ESC
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
libplacebo version: v7.349.0
FFmpeg version: 7.1.1
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:Fedora Linux 42 (Workstation Edition)
- Kernel Version:6.15.9-201.fc42.x86_64
- GPU Model:Advanced Micro Devices, Inc. [AMD/ATI] Renoir [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1636] (rev c7)
- Mesa/GPU Driver Version: 4.6 (Compatibility Profile) Mesa 25.1.4
- Window Manager and Version:Mutter on Wayland
- Source of mpv: Fedora repository
- Latest known working version:
- Issue started after the following happened:when i enabled fullscreen=yes in config file
Reproduction Steps
1.Open mpv with fullscreen=yes set in mpv.conf.
2.Play any video file.
3.Press ESC to exit fullscreen mode.
4.Observe that the window jumps to the top-left corner and does not return to its normal window size.
Expected Behavior
When exiting fullscreen, mpv should restore the window to the same size and position it had before entering fullscreen mode.
Actual Behavior
After pressing ESC to exit fullscreen, the window moves to the top-left of the screen and remains in that position, without returning to its original size or location.
Log File
Sample Files
When starting mpv with --fullscreen=yes on GNOME Wayland (Fedora 42, GNOME 48), pressing ESC to exit fullscreen restores the window to a tiny size in the top-left corner instead of a normal window size.
This happens because mpv never enters windowed mode first, so the compositor has no “last known window geometry” to restore.
Additional notes
This bug is Wayland-specific
Likely cause: On Wayland, if mpv never maps a window in windowed mode before fullscreen, GNOME Shell has no geometry to restore when exiting fullscreen.
Workaround: Start windowed for a short time before switching to fullscreen.
My workaround script Fix (~/.config/mpv/scripts/delayed-fullscreen.lua):
mp.register_event("file-loaded", function()
mp.command("set window-scale 1.0")
mp.add_timeout(0.1, function()
mp.command("cycle fullscreen")
end)
end)
This trick briefly maps mpv in windowed mode so GNOME can record valid geometry before switching to fullscreen. ESC then restores correctly.
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 by reproducing the issue with fullscreen=yes in mpv.conf on GNOME Wayland, using the supplied log-output.txt for comparison. Trace mpv's Wayland fullscreen and window-geometry handling around ESC and initial fullscreen startup; done means exiting fullscreen restores the prior normal size and position without requiring the delayed-fullscreen.lua workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100