Bug 507491 - Vertically maximizing an aspect-ratio restricted window ignores the aspect ratio
Summary: Vertically maximizing an aspect-ratio restricted window ignores the aspect ratio
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.4.80
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-25 20:15 UTC by Christoph Feck
Modified: 2025-10-08 12:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2025-07-25 20:15:24 UTC
The mpv video player resizes windows in a way to keep the aspect-ratio of the video. When MMB-clicking on the maximize button to maximize only vertically, the player used to also resize horizontally. Now, the window really only resizes vertically, so the video doesn't get any larger.

I have not updated mpv, only kwin from Qt 5 version to Qt 6 version, so this might be a regression. If this is intended new behaviour, and a mpv needs to be adapted, please close.

KWin X11 version is at 18cdcc81.
Comment 1 TraceyC 2025-07-30 16:44:54 UTC
Thanks for filing this bug report. Unfortunately there isn't enough information for us to try to figure out what's happening. Please add information about your system as requested in the bug report template. Copy and paste this with the information into a new comment.

SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running `kinfo` in a terminal window)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

Thanks for your understanding
Comment 2 Christoph Feck 2025-07-30 19:37:56 UTC
The git hash for KWin X11 was added at comment #0.
Comment 3 TraceyC 2025-07-30 20:25:45 UTC
(In reply to Christoph Feck from comment #2)
> The git hash for KWin X11 was added at comment #0.

We still need
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

Also, ideally, what distro you're running.

Thanks
Comment 4 Christoph Feck 2025-07-30 22:03:01 UTC
Distribution is openSUSE Tumbleweed with KDE:Unstable:Frameworks (git master builds) repository.

Qt Version: 6.9.1

KDE Plasma Versions:
breeze6-decoration-6.4.80git.20250729T014301~8d44109-ku.22.1.x86_64
breeze6-style-6.4.80git.20250727T014405~ad8e96c-ku.35.1.x86_64
kactivitymanagerd6-6.4.80git.20250727T102601~f2f73a5-ku.4.1.x86_64
kde-cli-tools6-6.4.80git.20250727T014414~23887e5-ku.13.1.x86_64
kglobalacceld6-6.4.80git.20250728T141216~0c97053-ku.8.1.x86_64
kmenuedit6-6.4.80git.20250728T013159~4781a44-ku.18.1.x86_64
knighttime-6.4.80git.20250728T013204~d59d772-ku.8.1.x86_64
kpipewire6-imports-6.4.80git.20250716T020500~50b769a-ku.25.1.x86_64
kscreen6-6.4.80git.20250727T014433~04af83f-ku.33.1.x86_64
kscreenlocker6-6.4.80git.20250727T014439~e103bff-ku.7.1.x86_64
ksshaskpass6-6.4.80git.20250716T020524~519d39b-ku.2.1.x86_64
ksysguardsystemstats6-data-6.4.80git.20250721T013423~0e3c168-ku.30.1.x86_64
ksystemstats6-6.4.80git.20250720T014413~a79c750-ku.5.1.x86_64
kwayland6-6.4.80git.20250519T183210~ba1be6e-ku.23.1.x86_64
kwin6-6.4.80git.20250728T143552~794041b2-ku.45.1.x86_64
kwin6-x11-6.4.80git.20250728T125942~ad4329c9-ku.75.1.x86_64
layer-shell-qt6-6.4.80git.20250519T183335~7a074a3-ku.23.1.x86_64
libKF6Screen8-6.4.80git.20250723T182557~53d2447-ku.23.1.x86_64
libKF6ScreenDpms8-6.4.80git.20250723T182557~53d2447-ku.23.1.x86_64
libKGlobalAccelD6-0-6.4.80git.20250728T141216~0c97053-ku.8.1.x86_64
libKNightTime0-6.4.80git.20250728T013204~d59d772-ku.8.1.x86_64
libKPipeWire6-6.4.80git.20250716T020500~50b769a-ku.25.1.x86_64
libKPipeWireDmaBuf6-6.4.80git.20250716T020500~50b769a-ku.25.1.x86_64
libKPipeWireRecord6-6.4.80git.20250716T020500~50b769a-ku.25.1.x86_64
libKScreenLocker6-6.4.80git.20250727T014439~e103bff-ku.7.1.x86_64
libKSysGuardSystemStats2-6.4.80git.20250721T013423~0e3c168-ku.30.1.x86_64
libKWaylandClient6-6.4.80git.20250519T183210~ba1be6e-ku.23.1.x86_64
libLayerShellQtInterface6-6.4.80git.20250519T183335~7a074a3-ku.23.1.x86_64
libPlasma5Support6-6.4.80git.20250727T013404~fd313dd-ku.16.1.x86_64
libPlasma6-6.4.80git.20250725T014435~726418b9-ku.29.1.x86_64
libPlasmaActivities6-6.4.80git.20250519T183524~6070913-ku.24.1.x86_64
libPlasmaActivitiesStats1-6.4.80git.20250519T183536~319d617-ku.24.1.x86_64
libkdecorations3-6-6.4.80git.20250718T123911~0342cc7-ku.25.1.x86_64
libkdecorations3private2-6.4.80git.20250718T123911~0342cc7-ku.25.1.x86_64
libkscreen6-plugin-6.4.80git.20250723T182557~53d2447-ku.23.1.x86_64
libksysguard6-6.4.80git.20250721T013423~0e3c168-ku.30.1.x86_64
libksysguard6-imports-6.4.80git.20250721T013423~0e3c168-ku.30.1.x86_64
libksysguard6-plugins-6.4.80git.20250721T013423~0e3c168-ku.30.1.x86_64
libkwin-x11-6-6.4.80git.20250728T125942~ad4329c9-ku.75.1.x86_64
libkwin6-6.4.80git.20250728T143552~794041b2-ku.45.1.x86_64
libplasma6-components-6.4.80git.20250725T014435~726418b9-ku.29.1.x86_64
libplasma6-desktoptheme-6.4.80git.20250725T014435~726418b9-ku.29.1.x86_64
milou6-6.4.80git.20250724T014551~c9225a4-ku.6.1.x86_64
plasma5support6-6.4.80git.20250727T013404~fd313dd-ku.16.1.x86_64
plasma6-activities-6.4.80git.20250519T183524~6070913-ku.24.1.x86_64
plasma6-activities-imports-6.4.80git.20250519T183524~6070913-ku.24.1.x86_64
plasma6-activities-stats-6.4.80git.20250519T183536~319d617-ku.24.1.x86_64
plasma6-desktop-6.4.80git.20250728T085942~5785a52a-ku.51.1.x86_64
plasma6-integration-plugin-6.4.80git.20250717T163200~6c0f984-ku.21.1.x86_64
plasma6-nm-6.4.80git.20250724T014640~fcade96-ku.36.1.x86_64
plasma6-pa-6.4.80git.20250718T014055~7373c1e-ku.11.2.x86_64
plasma6-session-6.4.80git.20250728T213546~e13727df-ku.59.1.noarch
plasma6-session-x11-6.4.80git.20250728T213546~e13727df-ku.59.1.x86_64
plasma6-systemmonitor-6.4.80git.20250725T132902~e74854d-ku.9.1.x86_64
plasma6-workspace-6.4.80git.20250728T213546~e13727df-ku.59.1.x86_64
plasma6-workspace-libs-6.4.80git.20250728T213546~e13727df-ku.59.1.x86_64
polkit-kde-agent-6-6.4.80git.20250724T014725~4fbe8b0-ku.5.1.x86_64
powerdevil6-6.4.80git.20250724T014732~66814f4-ku.30.5.x86_64
qqc2-breeze-style6-6.4.80git.20250723T205933~e9f9e1b-ku.25.1.x86_64
sddm-kcm6-6.4.80git.20250716T020912~b74f914-ku.7.1.x86_64
systemsettings6-6.4.80git.20250721T104410~fc1cbbf-ku.26.1.x86_64
xdg-desktop-portal-kde6-6.4.80git.20250725T141304~035bf6d-ku.22.1.x86_64

KDE Frameworks Versions:
libKF6Archive6-6.17.0git.20250727T013716~fac25ac-ku.10.1.x86_64
libKF6Attica6-6.17.0git.20250720T123904~d4d165e-ku.10.1.x86_64
libKF6AuthCore6-6.17.0git.20250721T082003~f1da9ed-ku.10.1.x86_64
libKF6BluezQt6-6.17.0git.20250720T123940~eca27c0-ku.10.1.x86_64
libKF6Bookmarks6-6.17.0git.20250724T013631~25b32fa-ku.11.1.x86_64
libKF6BookmarksWidgets6-6.17.0git.20250724T013631~25b32fa-ku.11.1.x86_64
libKF6BreezeIcons6-6.17.0git.20250704T182350~378fbf3-ku.9.1.x86_64
libKF6CalendarEvents6-6.17.0git.20250723T065314~0685c7e-ku.10.1.x86_64
libKF6Codecs6-6.17.0git.20250721T121112~da16833-ku.11.1.x86_64
libKF6ColorScheme6-6.17.0git.20250721T175131~db2e266-ku.3.3.x86_64
libKF6Completion6-6.17.0git.20250721T175520~e8ab673-ku.10.1.x86_64
libKF6ConfigCore6-6.17.0git.20250714T014010~f44e616-ku.9.1.x86_64
libKF6ConfigGui6-6.17.0git.20250714T014010~f44e616-ku.9.1.x86_64
libKF6ConfigQml6-6.17.0git.20250714T014010~f44e616-ku.9.1.x86_64
libKF6ConfigWidgets6-6.17.0git.20250728T173013~8a13418-ku.13.1.x86_64
libKF6CoreAddons6-6.17.0git.20250727T184042~72548e2-ku.11.1.x86_64
libKF6Crash6-6.17.0git.20250721T184356~3b7af02-ku.11.1.x86_64
libKF6DBusAddons6-6.17.0git.20250720T213504~7ba777f-ku.10.1.x86_64
libKF6DNSSD6-6.17.0git.20250720T213814~03a9674-ku.10.1.x86_64
libKF6DocTools6-6.17.0git.20250723T065418~d79ed64-ku.10.1.x86_64
libKF6FileMetaData3-6.17.0git.20250727T013735~4841cfd-ku.6.1.x86_64
libKF6GlobalAccel6-6.17.0git.20250723T065206~81ec289-ku.10.1.x86_64
libKF6GuiAddons6-6.17.0git.20250720T213948~201cc9a-ku.10.1.x86_64
libKF6Holidays6-6.17.0git.20250720T214012~5e965b8-ku.10.1.x86_64
libKF6I18n6-6.17.0git.20250723T211434~1034c0f-ku.10.1.x86_64
libKF6IconThemes6-6.17.0git.20250721T202931~495785a-ku.11.1.x86_64
libKF6IconWidgets6-6.17.0git.20250721T202931~495785a-ku.11.1.x86_64
libKF6IdleTime6-6.17.0git.20250720T214133~32037d7-ku.10.1.x86_64
libKF6ItemModels6-6.17.0git.20250720T214357~d75585e-ku.10.1.x86_64
libKF6ItemViews6-6.17.0git.20250724T013709~d8f4ad4-ku.10.1.x86_64
libKF6JobWidgets6-6.17.0git.20250728T155604~17c88e3-ku.11.1.x86_64
libKF6KCMUtils6-6.17.0git.20250724T013637~26a2196-ku.11.1.x86_64
libKF6KCMUtilsCore6-6.17.0git.20250724T013637~26a2196-ku.11.1.x86_64
libKF6KCMUtilsQuick6-6.17.0git.20250724T013637~26a2196-ku.11.1.x86_64
libKF6KIO6-6.17.0git.20250728T124529~2cf5289-ku.19.1.x86_64
libKF6ModemManagerQt6-6.17.0git.20250721T075643~fb16f67-ku.10.1.x86_64
libKF6NetworkManagerQt6-6.17.0git.20250721T075708~e5bb475-ku.10.1.x86_64
libKF6NewStuffCore6-6.17.0git.20250727T013757~55dee93-ku.11.1.x86_64
libKF6NewStuffWidgets6-6.17.0git.20250727T013757~55dee93-ku.11.1.x86_64
libKF6Notifications6-6.17.0git.20250722T065137~841a9ca-ku.11.1.x86_64
libKF6NotifyConfig6-6.17.0git.20250722T065232~008b074-ku.11.1.x86_64
libKF6Package6-6.17.0git.20250722T065331~87db2d8-ku.11.1.x86_64
libKF6Parts6-6.17.0git.20250722T065436~d79e350-ku.11.1.x86_64
libKF6Plotting6-6.17.0git.20250721T073646~6b54b3a-ku.10.1.x86_64
libKF6Prison6-6.17.0git.20250721T075810~f4d4190-ku.10.1.x86_64
libKF6Pty6-6.17.0git.20250722T065626~7c1c383-ku.11.1.x86_64
libKF6PulseAudioQt5-1.5git3~98d3a48-ku.29.9.x86_64
libKF6Purpose6-6.17.0git.20250728T013032~9c596f5-ku.11.1.x86_64
libKF6PurposeWidgets6-6.17.0git.20250728T013032~9c596f5-ku.11.1.x86_64
libKF6Runner6-6.17.0git.20250725T113842~63ed340-ku.12.1.x86_64
libKF6Screen8-6.4.80git.20250723T182557~53d2447-ku.23.1.x86_64
libKF6ScreenDpms8-6.4.80git.20250723T182557~53d2447-ku.23.1.x86_64
libKF6Service6-6.17.0git.20250724T155425~a337aa3-ku.11.1.x86_64
libKF6Solid6-6.17.0git.20250724T151743~a3302b5-ku.11.1.x86_64
libKF6SonnetCore6-6.17.0git.20250724T013755~7c75376-ku.10.1.x86_64
libKF6SonnetUi6-6.17.0git.20250724T013755~7c75376-ku.10.1.x86_64
libKF6StatusNotifierItem6-6.17.0git.20250722T065954~b6a17da-ku.3.3.x86_64
libKF6Style6-6.17.0git.20250723T065511~0763cad-ku.16.1.x86_64
libKF6Su6-6.17.0git.20250723T070319~b90724f-ku.10.1.x86_64
libKF6Svg6-6.17.0git.20250722T070045~ad9ddce-ku.4.3.x86_64
libKF6Syndication6-6.17.0git.20250722T080841~c5d68d2-ku.10.1.x86_64
libKF6SyntaxHighlighting6-6.17.0git.20250727T013820~e86b141-ku.18.1.x86_64
libKF6TextEditor6-6.17.0git.20250725T013733~daf4177-ku.12.1.x86_64
libKF6TextWidgets6-6.17.0git.20250724T013727~e387cc2-ku.11.1.x86_64
libKF6ThreadWeaver6-6.17.0git.20250721T081159~348c90e-ku.10.1.x86_64
libKF6UnitConversion6-6.17.0git.20250722T075654~9bb47bb-ku.12.1.x86_64
libKF6Wallet6-6.17.0git.20250724T013739~daa09a3-ku.11.1.x86_64
libKF6WalletBackend6-6.17.0git.20250724T013739~daa09a3-ku.11.1.x86_64
libKF6WidgetsAddons6-6.17.0git.20250721T075526~034625e-ku.10.1.x86_64
libKF6WindowSystem6-6.17.0git.20250721T075546~577c75e-ku.10.1.x86_64
libKF6XmlGui6-6.17.0git.20250727T013811~f013223-ku.11.1.x86_64
Comment 5 TraceyC 2025-07-31 21:40:59 UTC
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.17.0
Comment 6 TraceyC 2025-07-31 22:44:45 UTC
Note:
Enabling middle click to maximize a window vertically is set in
System Settings -> Window Management -> Window Behavior -> Titlebar Actions -> Maximize Button Actions (which is the default0

This will work with all windows.

I confirm the bug with git-master - the maximize button in mpv does not respond to middle click unless a video is playing.
With a video playing, middle click just moves the window up a little, but doesn't enlarge the video at all.

Other windows maximize vertically as expected, including Haruna.

I don't know if the root cause is in mpv or kwin, I'll let the developers make that determination.
Comment 7 Nate Graham 2025-09-23 18:18:35 UTC
Does it happen on Wayland, too?
Comment 8 TraceyC 2025-09-24 15:39:35 UTC
(In reply to Nate Graham from comment #7)
> Does it happen on Wayland, too?

I had tested with Wayland
Comment 9 Zamundaaa 2025-10-08 12:36:34 UTC
(In reply to Christoph Feck from comment #0)
> The mpv video player resizes windows in a way to keep the aspect-ratio of
> the video. When MMB-clicking on the maximize button to maximize only
> vertically, the player used to also resize horizontally. Now, the window
> really only resizes vertically, so the video doesn't get any larger.
Tbh there isn't anything super good that can be done with vertically maximizing a video - the "before" behavior also sounds bad to me - so I don't think there's anything we can do to make this better.