Skip to content

RemoteDesktop: Use logical size for screens, fix sendPointerMotionAbsolute being relative to a stream's position

Arjen Hiemstra requested to merge work/ahiemstra/logicalsize into master

According to the documentation here https://flatpak.github.io/xdg-desktop-portal/#gdbus-method-org-freedesktop-portal-RemoteDesktop.NotifyPointerMotionAbsolute sendPointerMotionAbsolute should be in logical coordinates relative to the specified stream. This was completely ignored by the existing implementation, instead having a global "streamed screen position", which was set to whatever the last stream was that was started. This breaks when using multiple streams, causing all input to be relative to the last stream.

Instead, we now lookup the requested stream and use its position as offset. In addition, there's some changes to send the logical size for streams instead of the pixel size. The screencast portal documentation actually talks about "compositor coordinate space", which is somewhat unclear, the above mentioned remote desktop documentation talks about logical size. Since KWin internally also uses logical coordinates for most things, using logical here seems the most... logical.

I'd like to backport this to 5.27 as the current behaviour is just broken and makes it impossible to send pointer motion for a different stream than the last.

Merge request reports