[gnome-remote-desktop] session-rdp: Use the value 10.0 DISCRETE_SCROLL_STEP



commit 54cc935d8bc1872b0cab204f6672d2a29913a4da
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Thu Feb 11 12:58:00 2021 +0100

    session-rdp: Use the value 10.0 DISCRETE_SCROLL_STEP
    
    Although the value 10.0 is a terrible choice, for the scrolling step,
    mutter, unfortunately, uses it everywhere.
    Using a different (and usually a better) value like 12 is unfortunately
    currently not possible, unless mutter adopts a better scrolling step,
    like 120.
    
    So, change the value to 10.0 instead of 12 to not mess things up on the
    mutter side, when emulating discrete scrolling events.
    Additionally, rename the variable to DISCRETE_SCROLL_STEP, as that is
    the name that mutter internally uses.

 src/grd-session-rdp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/grd-session-rdp.c b/src/grd-session-rdp.c
index ffe3be7..644a182 100644
--- a/src/grd-session-rdp.c
+++ b/src/grd-session-rdp.c
@@ -40,7 +40,7 @@
 #include "grd-settings.h"
 #include "grd-stream.h"
 
-#define SCROLL_STEP 12
+#define DISCRETE_SCROLL_STEP 10.0
 
 typedef enum _RdpPeerFlag
 {
@@ -1189,13 +1189,13 @@ rdp_input_mouse_event (rdpInput *rdp_input,
   if (flags & PTR_FLAGS_WHEEL)
     {
       grd_rdp_event_queue_add_input_event_pointer_axis (
-        rdp_event_queue, 0, axis_step * SCROLL_STEP,
+        rdp_event_queue, 0, axis_step * DISCRETE_SCROLL_STEP,
         GRD_POINTER_AXIS_FLAGS_SOURCE_WHEEL);
     }
   if (flags & PTR_FLAGS_HWHEEL)
     {
       grd_rdp_event_queue_add_input_event_pointer_axis (
-        rdp_event_queue, -axis_step * SCROLL_STEP, 0,
+        rdp_event_queue, -axis_step * DISCRETE_SCROLL_STEP, 0,
         GRD_POINTER_AXIS_FLAGS_SOURCE_WHEEL);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]