Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
1.98k stars 169 forks source link

xpra shadow: on client window maximize, (down)scale the shadowed screen to "perfectly fit" the new window geometry #2458

Open totaam opened 5 years ago

totaam commented 5 years ago

Issue migrated from trac ticket # 2458

component: client | priority: minor

2019-10-20 13:31:24: stdedos created the issue


Attempt to almost imitate the RDP protocol.

I would guess that changing the underlaying resolution would be way too complicated, since the monitors are attached to physical monitors.

When maximizing the client (or going full screen), attempt to scale the image perfectly to size (optionally, give the option to add black bars to avoid weird stretching).

Note that the scale "you" are doing might be better than the OpenGL scaling (text is unreadable, there are too many artifacts)

totaam commented 5 years ago

Previously discussed in #2455 where some screenshots can be found.

Note that the scale "you" are doing might be better than the OpenGL scaling (text is unreadable, there are too many artifacts)

I don't understand this bit. OpenGL scaling is not meant to give any artifacts. There may be a slight blur with non whole integer scaling, but when scaling by 200%, it should be "pixel perfect" - which just means you get jagged edges.

totaam commented 5 years ago

Note that the scale "you" are doing might be better than the OpenGL scaling (text is unreadable, there are too many artifacts)

I don't understand this bit. OpenGL scaling is not meant to give any artifacts. There may be a slight blur with non whole integer scaling, but when scaling by 200%, it should be "pixel perfect" - which just means you get jagged edges

Apologies, I keep forgetting to mention everything all the time 😅.

My usecase is scaling down, not up. (Q)HD to 1366x768 screen

totaam commented 5 years ago

My usecase is scaling down, not up. (Q)HD to 1366x768 screen

Right, in that case you also need #2052 to save tons of network traffic and use a high quality downscaling algorithm.

See also #530.

stdedos commented 1 year ago

I assume this is a priority at the second-tier? (i.e., after https://github.com/Xpra-org/xpra/issues/3948)

Should we use this to track only downscaling (as it was original), or upscaling too?

I assume that after https://github.com/Xpra-org/xpra/issues/3140 --desktop-scaling should accept any float value. The "kicker" would be to do the math, per geometry-change, and handle the N monitors shadowing (if at all possible)

stdedos commented 4 months ago

tl;dr: If a server 2560x1440 is rendered at a client 1920x1080 (or smaller, since the xpra client window and the desktop usually take up some of that space too), then xpra shadow server will downscale its output accordingly, to fix the client's viewport exactly (adding black bars as necessary) - without needing specifying --desktop-scaling manually

stdedos commented 4 months ago

Even more tl;dr, since "A picture is worth a thousand words"

image

image

(Rustdesk)