mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-08 12:57:02 +08:00
Added workaround for win32 low-level mouse hook position weirdness.
The low-level hook can report mouse positions outside the boundaries of the screen and bogus retrograde motion. This messes up switch on double tap. This change attempts to detect and suppress the bogus events.
This commit is contained in:
@@ -278,6 +278,13 @@ private:
|
||||
// whichever screen is active
|
||||
SInt32 m_x, m_y;
|
||||
|
||||
// last mouse deltas. this is needed to smooth out double tap
|
||||
// on win32 which reports bogus mouse motion at the edge of
|
||||
// the screen when using low level hooks, synthesizing motion
|
||||
// in the opposite direction the mouse actually moved.
|
||||
SInt32 m_xDelta, m_yDelta;
|
||||
SInt32 m_xDelta2, m_yDelta2;
|
||||
|
||||
// current configuration
|
||||
CConfig m_config;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user