diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-06-21 16:54:12 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-06-22 13:37:23 +0000 |
commit | d2c0ba3f3073322ca6c8390394c3ecf5f7593775 (patch) | |
tree | d9bc1cd989619de3819e12f63895b2fd9f14076e /src | |
parent | 4fa8dfee5dd31433d22fdb449c1783e256931c8f (diff) |
Do not update scroll coordinates on ignorable enter events
This greatly reduces how often we reset the scroll evaluators,
especially with non-focused windows in KWin which sends an enter for
every wheel events in that case.
The update of the evaluators also has race conditions with the normal
events, and thus reducing them fixes odd scrolling behavior with rapid
firing mouse wheels.
Task-number: QTBUG-42415
Task-number: QTBUG-68734
Change-Id: I1c14ca3352bf9c6e57e47ad3aaee1712fe6ba30b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 731b00f8fd..c65fab449f 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -2251,15 +2251,15 @@ void QXcbWindow::handleEnterNotifyEvent(int event_x, int event_y, int root_x, in quint8 mode, quint8 detail, xcb_timestamp_t timestamp) { connection()->setTime(timestamp); -#ifdef XCB_USE_XINPUT21 - // Updates scroll valuators, as user might have done some scrolling outside our X client. - connection()->xi2UpdateScrollingDevices(); -#endif const QPoint global = QPoint(root_x, root_y); if (ignoreEnterEvent(mode, detail, connection()) || connection()->mousePressWindow()) return; +#ifdef XCB_USE_XINPUT21 + // Updates scroll valuators, as user might have done some scrolling outside our X client. + connection()->xi2UpdateScrollingDevices(); +#endif const QPoint local(event_x, event_y); QWindowSystemInterface::handleEnterEvent(window(), local, global); |