aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/platform/XWindowsScreen.h
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2018-09-19 18:24:12 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2018-09-19 18:24:12 -0400
commita12f59bc78d8eab79d24e2e625a9a85b81c20a54 (patch)
treef9d4bceac647f7f9ce335881f40be31169435349 /src/lib/platform/XWindowsScreen.h
parent7a723cbbf3b9ba1cf23ca67a08058b41e56831e8 (diff)
parent68a36b3b67ec82cdd3f77e88e40d1043cbab5000 (diff)
Update upstream source from tag 'upstream/2.1.2+dfsg'
Update to upstream version '2.1.2+dfsg' with Debian dir a655df7e32df947a70958a6a26869e4705733064
Diffstat (limited to 'src/lib/platform/XWindowsScreen.h')
-rw-r--r--src/lib/platform/XWindowsScreen.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/platform/XWindowsScreen.h b/src/lib/platform/XWindowsScreen.h
index 35f9368..a2e3495 100644
--- a/src/lib/platform/XWindowsScreen.h
+++ b/src/lib/platform/XWindowsScreen.h
@@ -136,6 +136,10 @@ private:
void onMouseRelease(const XButtonEvent&);
void onMouseMove(const XMotionEvent&);
+ // Returns the number of scroll events needed after the current delta has
+ // been taken into account
+ int accumulateMouseScroll(SInt32 yDelta) const;
+
bool detectXI2();
#ifdef HAVE_XI2
void selectXIRawMotion();
@@ -172,8 +176,15 @@ private:
// true if screen is being used as a primary screen, false otherwise
bool m_isPrimary;
+
+ // The size of a smallest supported scroll event, in points
int m_mouseScrollDelta;
+ // Accumulates scrolls of less than m_mouseScrollDelta across multiple
+ // scroll events. We dispatch a scroll event whenever the accumulated scroll
+ // becomes larger than m_mouseScrollDelta
+ mutable int m_accumulatedScroll;
+
Display* m_display;
Window m_root;
Window m_window;