Skip to content

[40] screencast: Fix transform_position(), when using fractional scaling

Jonas Ådahl requested to merge cherry-pick-25e28393 into gnome-40

Commit 64c9c9c5 fixed monitor screencasting, when fractional screencasting is enabled. For the remote desktop usage, NotifyPointerMotionAbsolute() submits the new mouse pointer position in addition to the stream, where the mouse pointer was moved. When not using fractional scaling, the mouse pointer position is correct. With the usage of fractional scaling, the mouse pointer position is wrong, as the scale of the position is applied two times.

Fix this behaviour, by reverting the second scale by dividing by the logical monitor scale, when fractional scaling is used.

Fixes: #1808 (closed) Part-of: !1867 (merged)

(cherry picked from commit 25e28393)

Merge request reports