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

Anthon Williamson <[email protected]> changed:

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

--- Comment #13 from Anthon Williamson <[email protected]> ---
Created attachment 198119
  --> https://bugs.kde.org/attachment.cgi?id=198119&action=edit
AI-assisted workaround: divide XDP pointer coordinates by (frame width /
logical screen width), optional pointerScale override; tested on one monitor at
125% only

Disclosure: this patch was written with AI assistance (Claude) to fix my own
machine. I'm not a KDE developer, I've tested it on one setup only, and I'm not
recommending that it be applied as-is. I'm posting the data in case it helps
whoever fixes this properly.

Setup: Fedora 45 (RakuOS KDE), Plasma 6.8.2, krfb 26.08.3 (rebuilt from the
release tarball), Wayland, pw framebuffer, one monitor at 2560x1440 with 125%
scaling (logical 2048x1152), phone VNC client.

Symptom: the real pointer doesn't follow the remote pointer; it stops short of
the screen edge. Everything matches at 100% scale.

What I measured: logging in XdpEventHandler::handlePointer showed the
framebuffer is 2560x1440 (physical pixels) and the client's x runs 0..2559.
Those values go unchanged to NotifyPointerMotionAbsolute, but the compositor
treats them as logical coordinates (2048 wide).

Dividing by QScreen::devicePixelRatio() (as in comment 12 on this bug) made it
worse for me: Qt reports 2 for the 1.25x output in krfb, so the pointer reached
only about 62% of the screen (2559 / 2 / 2048). Dividing by captured frame
width / QScreen::geometry().width() gives 2560 / 2048 = 1.25. With that, all
corners are reachable and clicks land correctly.

Patch: attached (one file, events/xdp/xdpevents.cpp), plus an optional
pointerScale= override in krfbrc.

Limitations: assumes the primary screen is the shared one (multi-monitor likely
still wrong); reads the override with QSettings rather than KConfig. A real fix
would probably use the stream size from the portal's Start response instead of
the primary screen. Only tested with a single monitor at 125%.

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

Reply via email to