Bug 509042 - Can't mouse to bottom right portion of window after changing display scaling / moving to another display
Summary: Can't mouse to bottom right portion of window after changing display scaling ...
Status: RESOLVED FIXED
Alias: None
Product: krdc
Classification: Applications
Component: VNC (other bugs)
Version First Reported In: 25.08.0
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Urs Wolfer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-02 20:48 UTC by zac
Modified: 2025-09-15 10:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zac 2025-09-02 20:48:01 UTC
SUMMARY
If I change the scale of my display, or drag the window to another display with a different scale, the mapping of the cursor between the KRDC window and the remote seems to get messed up

If I go to a smaller scale, I can't move the mouse to the lower or rightmost portion of the remote screen- instead the mouse leaves the KDRC window, like it thinks it's moved to the edge even though it hasn't.

If I go to a larger scale, then there's a 'dead zone' after leaving the bottom or right portion of the KDRC window where the mouse isn't actually moving on the remote or local screens, until I move 'far enough' (a similar distance to how far wasn't accessible on the smaller scale case) and then it continues on to the local screen properly.

Disconnecting from the session and reopening it fixes this, even without closing KRDC itself, but this is quite annoying for me since my usual day to day work involves multiple VNC viewers and changing which one is on my 'primary' monitor for ease of use frequently.

Strangely, going to a monitor with a scale below 100% doesn't seem to exhibit this problem, it's only 100% or more

STEPS TO REPRODUCE
1. Configure display at 125% scaling
2. Connect to VNC server
3. change display to 100% scaling
4. Attempt to move mouse to bottom right of window

OBSERVED RESULT
Mouse leaves window before reaching corner of remote screen


EXPECTED RESULT
Can access screen as normal

SOFTWARE/OS VERSIONS
Operating System: Aurora 42
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.14.11-300.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 2700X Eight-Core Processor
Memory: 64 GiB of RAM (62.7 GiB usable)
Graphics Processor: AMD Radeon RX 590 Series


ADDITIONAL INFORMATION
TightVNC windows server on remote
Comment 1 Fabio 2025-09-14 17:10:30 UTC
Confirmed, this problem is only present on VNC connections, since VncClientThread caches the devicePixelRatio value at connection start.
This causes the remote image to not respect DPI screen changes, so if you move the window to a screen with a lower DPI  its on-screen dimension stays the same (instead of getting resized accordingly to the DPI change value).
Comment 2 Bug Janitor Service 2025-09-14 18:38:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/krdc/-/merge_requests/210
Comment 3 Fabio 2025-09-15 08:44:05 UTC
Git commit 234371c906f4ae3b8e1768a9124fce66a8ed4ba3 by Fabio Bas.
Committed on 15/09/2025 at 08:44.
Pushed by ctrlaltca into branch 'master'.

Remoteview: detect DPI changes and inform the remoteview implementation.
VNC: on DPI change update the devixePixelratio used for the remote image and force a full redraw
Fixes the VNC view not resizing accordingly when moved on screens with a different DPI
Fixes the VNC view sending wrong coordinates for mouse updates to the remote server

M  +6    -0    core/remoteview.cpp
M  +1    -0    core/remoteview.h
M  +11   -0    vnc/vncclientthread.cpp
M  +6    -0    vnc/vncclientthread.h
M  +5    -0    vnc/vncview.cpp
M  +1    -0    vnc/vncview.h

https://invent.kde.org/network/krdc/-/commit/234371c906f4ae3b8e1768a9124fce66a8ed4ba3
Comment 4 Fabio 2025-09-15 10:37:14 UTC
Git commit cb9e59cd62900bd4c160b05554e6a7efa5c372b7 by Fabio Bas.
Committed on 15/09/2025 at 08:46.
Pushed by ctrlaltca into branch 'release/25.08'.

Remoteview: detect DPI changes and inform the remoteview implementation.
VNC: on DPI change update the devixePixelratio used for the remote image and force a full redraw
Fixes the VNC view not resizing accordingly when moved on screens with a different DPI
Fixes the VNC view sending wrong coordinates for mouse updates to the remote server


(cherry picked from commit 234371c906f4ae3b8e1768a9124fce66a8ed4ba3)

14a7e3d8 Remoteview: detect DPI changes and inform the remoteview implementation.
dddd6e92 Fix QTONLY build (running on ubuntu 22.04 with Qt6.2, yay!)

Co-authored-by: Fabio Bas <ctrlaltca@gmail.com>

M  +6    -0    core/remoteview.cpp
M  +1    -0    core/remoteview.h
M  +11   -0    vnc/vncclientthread.cpp
M  +6    -0    vnc/vncclientthread.h
M  +5    -0    vnc/vncview.cpp
M  +1    -0    vnc/vncview.h

https://invent.kde.org/network/krdc/-/commit/cb9e59cd62900bd4c160b05554e6a7efa5c372b7