Fix horizontal scrolling direction and capability detection
authorBinyamin Sagal <bensagal@gmail.com>
Mon, 14 Dec 2015 19:48:31 +0000 (21:48 +0200)
committerBinyamin Sagal <bensagal@gmail.com>
Mon, 14 Dec 2015 19:48:31 +0000 (21:48 +0200)
client/X11/xf_event.c
libfreerdp/core/capabilities.c

index e5d8058..65291ac 100644 (file)
@@ -349,13 +349,13 @@ BOOL xf_generic_ButtonPress(xfContext* xfc, int x, int y, int button, Window win
                case 6:         /* wheel left */
                        wheel = TRUE;
                        if (xfc->settings->HasHorizontalWheel)
-                               flags = PTR_FLAGS_HWHEEL | 0x0078;
+                               flags = PTR_FLAGS_HWHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0078;
                        break;
 
                case 7:         /* wheel right */
                        wheel = TRUE;
                        if (xfc->settings->HasHorizontalWheel)
-                               flags = PTR_FLAGS_HWHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0078;
+                               flags = PTR_FLAGS_HWHEEL | 0x0078;
                        break;
 
                default:
index c1ac6d5..32ea34d 100644 (file)
@@ -1236,13 +1236,14 @@ BOOL rdp_read_input_capability_set(wStream* s, UINT16 length, rdpSettings* setti
                {
                        /* advertised by RDP 5.2, 6.0, 6.1 and 7.0 servers */
                }
-               else if (inputFlags & TS_INPUT_FLAG_MOUSE_HWHEEL)
-                       settings->HasHorizontalWheel = TRUE;
                else
                {
                        /* server does not support fastpath input */
                        settings->FastPathInput = FALSE;
                }
+               if (inputFlags & TS_INPUT_FLAG_MOUSE_HWHEEL) {
+                       settings->HasHorizontalWheel = TRUE;
+               }
        }
        return TRUE;
 }