Improve input handling and scrolling behavior for high-resolution trackpads.
- Added precise fractional mouse wheel delta handling with per-step command emission. - Introduced scroll accumulators (`wheel_accum_y_`, `wheel_accum_x_`) for high-resolution trackpad input. - Replaced hardcoded ESC delay with configurable `kEscDelayMs` constant in `TerminalFrontend`. - Enabled mouse position reporting and reduced CPU usage during idle with optimized `timeout()` setting.
This commit is contained in:
@@ -41,4 +41,9 @@ private:
|
||||
bool suppress_text_input_once_ = false;
|
||||
|
||||
Editor *ed_ = nullptr; // attached editor for editor-owned uarg handling
|
||||
|
||||
// Accumulators for high-resolution (trackpad) scrolling. We emit one scroll
|
||||
// command per whole step and keep the fractional remainder.
|
||||
float wheel_accum_y_ = 0.0f;
|
||||
float wheel_accum_x_ = 0.0f; // reserved for future horizontal scrolling
|
||||
};
|
||||
Reference in New Issue
Block a user