PlasmaScreencastV1Session: Map the pointer to the streamed output

Follow-up to the pointer offset mentioned in !259 (merged): the Plasma session sends the pointer position without a mapping id, so KWin takes the stream's pixel position as a global logical position. It is only right for an output at 0,0 with scale 1; with a scaled virtual monitor every click lands below and right of the pointer.

This passes the name of the streamed output as the mapping id, like the portal session does with the stream's mapping_id. KWin's EIS regions carry the position and logical size of each output, so no extra mapping code is needed. Streaming the whole workspace keeps an empty mapping id as before.

With libei this covers what !255 (closed) did for the old code.

Tested in a nested KWin 6.8.0 with mstsc, clicks land under the pointer:

  • --virtual-monitor with a 3840x2160 client at 150%, before they landed below and right of the pointer.
  • --monitor with two outputs at scale 1.5, streaming the one at 0,0 and the one at 1920,0.

Merge request reports

Loading
Loading