From 531eb22182929ead0bfb3506aad7a1bd41276be8 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Wed, 21 Oct 2020 00:58:22 +0200 Subject: [PATCH] Increased the keyboard interval from 13.3 Hz to 30 Hz --- ChangeLog | 4 ++++ src/fkeyboard.cpp | 6 +++--- src/flistbox.cpp | 1 + src/flistview.cpp | 1 + src/fmenu.cpp | 1 + src/fvterm.cpp | 3 +-- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4be7596..ac4d98a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2020-10-20 Markus Gans + * For fast mouse movements the keyboard interval was increased + from 13.3 to 30 Hz + 2020-10-19 Markus Gans * Optimize the terminal output speed diff --git a/src/fkeyboard.cpp b/src/fkeyboard.cpp index f0d9d2db..4cb1b6ca 100644 --- a/src/fkeyboard.cpp +++ b/src/fkeyboard.cpp @@ -44,9 +44,9 @@ namespace finalcut { // static class attributes -uInt64 FKeyboard::read_blocking_time{100000}; // preset to 100 ms / 10 Hz -uInt64 FKeyboard::key_timeout{100000}; // preset to 100 ms / 10 Hz -uInt64 FKeyboard::interval_timeout{75000}; // preset to 75 ms / 13.3 Hz +uInt64 FKeyboard::read_blocking_time{100000}; // preset to 100 ms (10 Hz) +uInt64 FKeyboard::key_timeout{100000}; // preset to 100 ms (10 Hz) +uInt64 FKeyboard::interval_timeout{33333}; // preset to 33.333 ms (30 Hz) struct timeval FKeyboard::time_keypressed{}; struct timeval FKeyboard::time_last_request{}; diff --git a/src/flistbox.cpp b/src/flistbox.cpp index 2fb0f1c4..b4835ed6 100644 --- a/src/flistbox.cpp +++ b/src/flistbox.cpp @@ -426,6 +426,7 @@ void FListBox::onMouseMove (FMouseEvent* ev) vbar->drawBar(); processTerminalUpdate(); + flush(); } // Auto-scrolling when dragging mouse outside the widget diff --git a/src/flistview.cpp b/src/flistview.cpp index ab7a4e2c..ed36d44f 100644 --- a/src/flistview.cpp +++ b/src/flistview.cpp @@ -1221,6 +1221,7 @@ void FListView::onMouseMove (FMouseEvent* ev) vbar->drawBar(); processTerminalUpdate(); + flush(); } // auto-scrolling when dragging mouse outside the widget diff --git a/src/fmenu.cpp b/src/fmenu.cpp index ee5be03d..3f9534e9 100644 --- a/src/fmenu.cpp +++ b/src/fmenu.cpp @@ -312,6 +312,7 @@ void FMenu::onMouseMove (FMouseEvent* ev) { closeOpenedSubMenu(); processTerminalUpdate(); + flush(); } } diff --git a/src/fvterm.cpp b/src/fvterm.cpp index b6e4a40e..a9175e97 100644 --- a/src/fvterm.cpp +++ b/src/fvterm.cpp @@ -152,7 +152,6 @@ void FVTerm::setTermXY (int x, int y) const if ( move_str ) appendOutputBuffer(move_str); - flush(); term_pos->setPoint(x, y); } @@ -183,7 +182,7 @@ void FVTerm::hideCursor (bool enable) const const char* visibility_str = FTerm::cursorsVisibilityString (enable); - if ( ! visibility_str ) + if ( ! visibility_str ) // Exit the function if the string is empty return; appendOutputBuffer(visibility_str);