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

            Bug ID: 524406
           Summary: Mouse coordinates restricted to top-left quadrant when
                    using Display Scaling > 100% (XDP / PipeWire scale
                    mismatch)
    Classification: Applications
           Product: krfb
      Version First 26.04.3
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
On Wayland, setting a display scale other than 100% (e.g., 200%) causes mouse
cursor input coordinates to bound tightly to the top-left portion of the
screen. Moving the remote client cursor beyond the top-left quadrant slams the
server cursor into the right or bottom screen edges.

This issue persists regardless of the remote VNC client used (RealVNC,
TigerVNC, etc.). Alternative remote desktop implementations like
Sunshine/Moonlight operate normally under the same display scaling
configurations.

STEPS TO REPRODUCE
Log into a Plasma Wayland session with a scaled output (e.g., 2560x1600 set to
200% scale).
Start KRFB.
Connect to KRFB using any standard VNC viewer.
Attempt to move the mouse cursor across the remote display.

OBSERVED RESULT
The remote cursor is constrained to a fraction of the screen (e.g., the
top-left quadrant at 200% scaling). Moving toward the middle of the remote
window drives the actual pointer to the physical right/bottom edges of the host
screen.

EXPECTED RESULT
The client mouse input maps 1:1 across the entire desktop viewport regardless
of the scale factor applied on the server host.

POSSIBLE CAUSE / CODE POINTERS
This appears to stem from a coordinate space mismatch between the event handler
and the PipeWire framebuffer dimensions under Wayland/XDP:
In events/xdp/xdpevents.cpp, incoming VNC pointer events send raw input
coordinates (x, y) to the XDG Desktop Portal via NotifyPointerMotionAbsolute.
The portal interprets these as stream coordinates matching the PipeWire
framebuffer size (pw_framebuffer.cpp).
Framebuffer size is calculated as resolution * scale (e.g., 2560x1600 * 2.0 =
5120x3200).
If the portal expects coordinates relative to the logical screen space (e.g.,
0..2559), but receives or maps them against physical/buffer pixel spaces (or
vice versa), the coordinate mapping double-scales or clips at the logical
bound.

SOFTWARE / OS VERSIONS
OS: Fedora 44
KDE Plasma: 6.7.4
KDE Frameworks / KRFB: 26.04.3 (KRFB package 26.04.3-1.fcc44.x86_64)
Session Type: Wayland

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

Reply via email to