From 7566c8c2bf82fecf49b787c1f885d877a417160d Mon Sep 17 00:00:00 2001 From: unK Date: Thu, 28 Aug 2008 16:11:57 +0200 Subject: [PATCH] fix for blocking library screen for some people while scrolling artists' list --- src/ncmpcpp.cpp | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index ab8b1e9e..2a625d70 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -520,9 +520,37 @@ int main(int argc, char *argv[]) // key mapping beginning if (Keypressed(input, Key.Up)) - wCurrent->Go(UP); + { + if (wCurrent == mLibArtists) + { + wCurrent->Timeout(50); + while (Keypressed(input, Key.Up)) + { + wCurrent->Go(UP); + wCurrent->Refresh(); + wCurrent->ReadKey(input); + } + wCurrent->Timeout(ncmpcpp_window_timeout); + } + else + wCurrent->Go(UP); + } else if (Keypressed(input, Key.Down)) - wCurrent->Go(DOWN); + { + if (wCurrent == mLibArtists) + { + wCurrent->Timeout(50); + while (Keypressed(input, Key.Down)) + { + wCurrent->Go(DOWN); + wCurrent->Refresh(); + wCurrent->ReadKey(input); + } + wCurrent->Timeout(ncmpcpp_window_timeout); + } + else + wCurrent->Go(DOWN); + } else if (Keypressed(input, Key.PageUp)) wCurrent->Go(PAGE_UP); else if (Keypressed(input, Key.PageDown))