aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/platform/XWindowsScreen.h
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2018-09-19 18:23:50 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2018-09-19 18:23:50 -0400
commit68a36b3b67ec82cdd3f77e88e40d1043cbab5000 (patch)
tree6a23b540cdd5b17f4df92a850e2bc940d96d1cac /src/lib/platform/XWindowsScreen.h
parent4a8bfd06e73d7f051f0b39e19e57616c7bbb8ad1 (diff)
New upstream version 2.1.2+dfsgupstream/2.1.2+dfsg
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;