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

Billy T <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Billy T <[email protected]> ---
Confirmed on krdp 6.8.0 (release tarball, Plasma 6.8.0, Wayland, NVIDIA).
createVirtualMonitorStream() in src/screencasting.cpp still never sets
stream->d->m_size, so every pointer motion maps to (0,0).

The proposed one-line fix leaves the pointer wrong when the client resizes the
virtual monitor, which RemoteAccess mode does (--mode RemoteAccess, or "Enable
exclusive mode" in the KCM). My setup: krdpserver --plasma --mode RemoteAccess,
Windows App on macOS.

With only the proposed patch, the pointer moves but lands in the wrong place,
short of the real position. The virtual monitor starts at the default 1024x768,
and the client then resizes it through DisplayControl (here to 1728x1084 at
scale 1). PlasmaScreencastV1Session::setLogicalSize() runs once, with the size
at creation, so the MouseMove mapping (position / size()) * logicalSize() keeps
scaling into a 1024x768 space.

Mapping a virtual monitor's pointer as position / dpr fixes it. The pointer
kept tracking after repeated window resizes:

--- a/src/PlasmaScreencastV1Session.cpp
+++ b/src/PlasmaScreencastV1Session.cpp
@@ case QEvent::MouseMove: {
         auto logicalPosition = QPointF{(position.x() / size().width()) *
logicalSize().width(), ...};
+        if (auto vm = virtualMonitor()) {
+            logicalPosition = position / (vm->dpr > 0 ? vm->dpr : 1.0);
+        }

I tested scale 1, one client, and the --plasma (fake_input) path. I did not
test portal mode, where the libei port may behave differently.

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

Reply via email to