mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 13:03:48 -07:00
input: Emulate discrete scrolling from v120 events (#6881)
* seat: avoid sending axis_stop() when source is wheel * fix rounding for absolute discrete values greater than 1 Co-authored-by: Agent_00Ming <agent00ming9366@gmail.com>
This commit is contained in:
@@ -278,6 +278,14 @@ class CInputManager {
|
||||
|
||||
void restoreCursorIconToApp(); // no-op if restored
|
||||
|
||||
// discrete scrolling emulation using v120 data
|
||||
struct {
|
||||
bool lastEventSign = 0;
|
||||
bool lastEventAxis = 0;
|
||||
uint32_t lastEventTime = 0;
|
||||
uint32_t accumulatedScroll = 0;
|
||||
} m_ScrollWheelState;
|
||||
|
||||
friend class CKeybindManager;
|
||||
friend class CWLSurface;
|
||||
};
|
||||
|
Reference in New Issue
Block a user