<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>511029</bug_id>
          
          <creation_ts>2025-10-24 15:51:07 +0000</creation_ts>
          <short_desc>high resolution scroll events get ignored</short_desc>
          <delta_ts>2026-02-28 11:51:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>KRdp</product>
          <component>general</component>
          <version>6.5.0</version>
          <rep_platform>Neon</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=485724</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bernhard">micraft.b</reporter>
          <assigned_to name="Unassigned bugs">unassigned-bugs-null</assigned_to>
          <cc>4wy78uwh</cc>
    
    <cc>ahiemstra</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/krdp/-/commit/d8c1f28634289806e88d4ff14a53237cced059a8</cf_commitlink>
          <cf_versionfixedin>6.6.2</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2464603</commentid>
    <comment_count>0</comment_count>
    <who name="Bernhard">micraft.b</who>
    <bug_when>2025-10-24 15:51:07 +0000</bug_when>
    <thetext>SUMMARY
Scrolling with a touchpad doesn&apos;t work (at any reasonable speed). Honestly I thought this should have been fixed by BUG:496747 but apparently not. Notably, this hasn&apos;t worked correctly in any Plasma version for me.

STEPS TO REPRODUCE
1. Use a mouse or touchpad with high resolution (&quot;pixel perfect&quot;) scrolling
2. Connect using Krdc
3. Try scrolling normally (and slowly)

OBSERVED RESULT
My understanding is only scroll events that seem to cover enough &quot;distance&quot; in a single event seem get through, making for very slow scrolling (because most events are ignored) - and no scrolling at all if I don&apos;t give it all I&apos;ve got and go warp speed with my fingers :)

EXPECTED RESULT
Either:
- Correct modern scrolling
Scroll the correct distance. Works with krdc connected to a windows host, so this pretty much has to be on krdp.

- Legacy accounting for scroll distance:
Accumulate wheel delta and send a normal legacy 120px (I think?) scroll event once that threshold has been reached.

SOFTWARE/OS VERSIONS
krdp computer:
Linux/KDE Plasma: KDE Neon 24.04
KDE Plasma Version: 6.5.0
KDE Frameworks Version: 6.19.0
Qt Version: 6.9.2

Client pc:
krdc client 25.08.2
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2464677</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2025-10-24 17:40:13 +0000</bug_when>
    <thetext>Might be Bug 485724?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2464688</commentid>
    <comment_count>2</comment_count>
    <who name="Bernhard">micraft.b</who>
    <bug_when>2025-10-24 18:00:39 +0000</bug_when>
    <thetext>(In reply to Nate Graham from comment #1)
&gt; Might be Bug 485724?

My Logitech M710 works correctly when directly connected to either system, just not through KRDP.

Also scrolling doesn&apos;t work with KRDP at all when doing it slowly, no matter for how long you scroll slowly.

Both of those facts lead me to believe that it&apos;s not that Bug 485724</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2492862</commentid>
    <comment_count>3</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2026-02-09 18:01:56 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/krdp/-/merge_requests/143</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2492882</commentid>
    <comment_count>4</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2026-02-09 19:15:03 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/krdp/-/merge_requests/144</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2497946</commentid>
    <comment_count>5</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2026-02-24 13:13:45 +0000</bug_when>
    <thetext>Git commit 433babfefcd28bf186e5d184ad8450dcd0f52157 by David Edmundson, on behalf of reali es.
Committed on 24/02/2026 at 13:13.
Pushed by davidedmundson into branch &apos;master&apos;.

Fix scroll wheel for RDP clients sending high-resolution or zero-position events

## Summary

Some RDP clients, notably Microsoft Remote Desktop for Mac, send wheel events with:
1. **(0,0) as the mouse position** — MRD omits cursor coordinates for wheel events
2. **Sub-120 axis rotation values** — macOS smooth scrolling sends high-resolution deltas (1-22 per event) instead of the standard 120 per wheel notch

This caused scrolling to be completely non-functional with MRD on both the Portal and Plasma screencast session paths.

### Changes

- **InputHandler.cpp**: Track last known mouse position from move events and substitute it when a wheel event arrives with a null position
- **PortalSession.cpp**: Switch from `NotifyPointerAxisDiscrete` (integer steps, truncates sub-120 values to 0) to `NotifyPointerAxis` (smooth scroll, preserves sub-notch precision)
- **PlasmaScreencastV1Session.cpp**: Fix `wl_fixed_t` conversion using `wl_fixed_from_double()` (was passing raw int, making values ~256x smaller than intended)
- Both session paths now convert Qt angleDelta (1/8-degree units) to degrees by dividing by 8, producing 15.0 per standard notch — matching libinput&apos;s wheel axis convention

### Test plan

- [x] Connect with Microsoft Remote Desktop for Mac — scrolling should work in both directions with natural speed
- [x] Connect with xfreerdp/standard RDP client — verify scrolling still works correctly (standard 120-per-notch values)
- [ ] Test horizontal scrolling if client supports it
- [x] Verify mouse position is correct during scroll (not jumping to top-left corner)

M  +31   -4    src/InputHandler.cpp
M  +7    -3    src/PlasmaScreencastV1Session.cpp
M  +6    -7    src/PortalSession.cpp

https://invent.kde.org/plasma/krdp/-/commit/433babfefcd28bf186e5d184ad8450dcd0f52157</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2497958</commentid>
    <comment_count>6</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2026-02-24 14:46:58 +0000</bug_when>
    <thetext>Git commit d8c1f28634289806e88d4ff14a53237cced059a8 by Nate Graham.
Committed on 24/02/2026 at 14:29.
Pushed by ngraham into branch &apos;Plasma/6.6&apos;.

Fix scroll wheel for RDP clients sending high-resolution or zero-position events

## Summary

Some RDP clients, notably Microsoft Remote Desktop for Mac, send wheel events with:
1. **(0,0) as the mouse position** — MRD omits cursor coordinates for wheel events
2. **Sub-120 axis rotation values** — macOS smooth scrolling sends high-resolution deltas (1-22 per event) instead of the standard 120 per wheel notch

This caused scrolling to be completely non-functional with MRD on both the Portal and Plasma screencast session paths.

### Changes

- **InputHandler.cpp**: Track last known mouse position from move events and substitute it when a wheel event arrives with a null position
- **PortalSession.cpp**: Switch from `NotifyPointerAxisDiscrete` (integer steps, truncates sub-120 values to 0) to `NotifyPointerAxis` (smooth scroll, preserves sub-notch precision)
- **PlasmaScreencastV1Session.cpp**: Fix `wl_fixed_t` conversion using `wl_fixed_from_double()` (was passing raw int, making values ~256x smaller than intended)
- Both session paths now convert Qt angleDelta (1/8-degree units) to degrees by dividing by 8, producing 15.0 per standard notch — matching libinput&apos;s wheel axis convention

### Test plan

- [x] Connect with Microsoft Remote Desktop for Mac — scrolling should work in both directions with natural speed
- [x] Connect with xfreerdp/standard RDP client — verify scrolling still works correctly (standard 120-per-notch values)
- [ ] Test horizontal scrolling if client supports it
- [x] Verify mouse position is correct during scroll (not jumping to top-left corner)


(cherry picked from commit 433babfefcd28bf186e5d184ad8450dcd0f52157)

405b694f Fix scroll wheel for RDP clients sending high-resolution or zero-position events

Co-authored-by: reali es &lt;kde@reali.es&gt;

M  +31   -4    src/InputHandler.cpp
M  +7    -3    src/PlasmaScreencastV1Session.cpp
M  +6    -7    src/PortalSession.cpp

https://invent.kde.org/plasma/krdp/-/commit/d8c1f28634289806e88d4ff14a53237cced059a8</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>