Bug 510631 - [Feature request] Add "Zoom to window" feature / keyboard shortcut
Summary: [Feature request] Add "Zoom to window" feature / keyboard shortcut
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (other bugs)
Version First Reported In: unspecified
Platform: unspecified Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-15 08:26 UTC by KOPRajs
Modified: 2025-10-18 06:56 UTC (History)
2 users (show)

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


Attachments
Running the old Ignition game zoomed in (1.14 MB, image/png)
2025-10-15 08:26 UTC, KOPRajs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description KOPRajs 2025-10-15 08:26:26 UTC
Created attachment 185795 [details]
Running the old Ignition game zoomed in

Please consider adding a feature to use the desktop zoom effect to fit the selected window to fullscreen.

This is a feature I've been missing very much since the Compiz days. It was very useful to fake fullscreen for old games, which don't support your native screen resolution and cannot be switched to fullscreen (e.g. because of wayland). You can start the game in its native resolution in windowed mode (or using the virtual desktop feature in Wine) and then use the desktop zoom effect to bring the window to the whole screen (including bilinear filtering).

It is currently possible to achieve similar result by disabling the "Mouse Tracking" and manually zooming to match the window size and position, but it is not very comfortable to do it. See the attached screenshot.

I would suggest to add a new keyboard shortcut "Zoom to active window" to the "Desktop Effects - Zoom", which would zoom in to automatically match the current active window size and position to fit the whole screen (maybe without the window decoration optionally) and temporarily disable the mouse tracking (until the zoom level is changed, e.g. by "Meta+-").

I would also suggest to add a menu entry for this feature into the "Alt+F3" window menu in "More Actions" somewhere close to the "Fullscreen" option. In this case, it would zoom to this window instead of the active window.
Comment 1 KOPRajs 2025-10-15 08:37:35 UTC
Another idea would be to optionally temporarily dim the rest of the desktop, so you see only the zoomed window, but that is just the icing on the cake.
Comment 2 David Edmundson 2025-10-16 09:16:34 UTC
>. It was very useful to fake fullscreen for old games, which don't support your native screen resolution and cannot be switched to fullscreen (e.g. because of wayland).

Lets break this down.

>which don't support your native screen resolution

That doesn't matter, we can direct scan out anything at any size and rescale it.

>and cannot be switched to fullscreen (e.g. because of wayland).

that's fixable. 

---

This is jumping to a very terrible hacky workaround, to solve a problem that can be solved properly in the first place.

Can you open a new bug where you focus on just the problem and don't propose a solution.
Comment 3 KOPRajs 2025-10-16 11:24:34 UTC
Well, sorry, possibly my personal use case is not the greatest example, but this feature is a standard feature that e.g. Compiz has. My use case can be solved several ways, but to be able to zoom any window to full screen would still be nice feature.

Also, I'm not aware of any other working solution for the old games mentioned. Even on X11, where it was possible to switch to fullscreen, I preferred this way because of seamless switching between the game and the desktop without switching display resolution and changing geometry of all other windows.
Comment 4 KOPRajs 2025-10-18 06:56:27 UTC
For a reference, here is a documentation from Compiz, which contains the requested feature:
https://compiz-fusion.org/wiki_subdomain/plugins/ezoom.html

The feature is called "Fit zoomed area to window" with default shortcut being "Meta+R".
Description: "Adjusts the zoom level so that the window fills the field of view."

Since most of the functionality is already there, I was hoping this would be pretty easy to implement.