https://bugs.kde.org/show_bug.cgi?id=511072

            Bug ID: 511072
           Summary: [Feature request] Add "Fullscreen window" KWin effect
    Classification: Plasma
           Product: kwin
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: effects-window-management
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

I'm looking for a way to create a "Fullscreen window" KWin effect. The original
idea and request was started here: https://bugs.kde.org/show_bug.cgi?id=510631

The basic task is to render a content of any window upscaled to fullscreen
(activated by a keyboard shortcut like "Alt+Enter"). If possible, optionally
applying a scaling shader (CRT, xBR etc.).

The motivation is to correctly display old games, which do not support native
screen resolution, on a modern big displays. Unlike classic fullscreen mode,
this would allow fine control of the output (aspect ratio, integer scaling, or
ultimately even shaders) while it wouldn't need to actually switch the display
mode (which is currently not possible on Wayland anyway). It would also enable
a seamless task switching between the games and the desktop. Another possible
usecase might be to scale an old video using the CRT shader etc.

I've briefly looked at the possibilities and it seems that this currently
cannot be done in the QML effect, because of the need to handle the mouse when
the window is scaled to fullscreen.
Creating such effect in C++ seems possible (by partialy re-using code from the
magnifier effect), but I'm not sure, if such feature has a chance to be
included in the core KWin effects.

Maintaining an out of tree C++ effect for KWin would be a pain, so the other
possibility would be to add the needed functionality to QML effects. I can then
create it as an external downloadable QML effect.
The missing features in QML effects are:
- Hide the system mouse cursor
- Draw a new one scaled to proper size and coords including the original shape
(just like in the built-in magnifier)

More background and already considered solutions:
Lets say we want to play an original "Age of Empires" game on a modern Plasma
desktop running on Wayland and a big ultrawide screen.
Currently the game works flawless in Wine, except it shows only a small picture
in top-left corner of the screen. The max supported resolution in the game is
10124x768.

- There are wrappers like DxWrapper or dgVoodoo, which can hack the game itself
and scale it to fullscreen, but not every game work great this way, you need to
handle every app separately. Also, I've noticed issues when switching from the
running game back to desktop.

- You can use the built-in screen magnifier with mouse tracking turned off, but
you can't zoom exactly to match the window size and it is not very comfortable.

- What you can do with any of the games is to make them run in a windowed mode.
If the game doesn't have a built-in window mode, you can use Wine desktop.

- Having the "Fullscreen effect" in KWin would allow for a great universal
solution for any type of apps (native, Wine, DirectX, OpenGL, even DosBox,
emulators etc.).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to