Merge pull request #58141 from dtzWill/fix/powertop-vert-scrolling

powertop: patch to fix vertical scrolling

authored by

Will Dietz and committed by
GitHub
0d1209a3 a8d0049b

+17 -1
+4 -1
pkgs/os-specific/linux/powertop/default.nix
··· 20 20 url = "https://git.alpinelinux.org/cgit/aports/plain/main/powertop/strerror_r.patch?id=3b9214d436f1611f297b01f72469d66bfe729d6e"; 21 21 sha256 = "1kzddhcrb0n2iah4lhgxwwy4mkhq09ch25jjngyq6pdj6pmfkpfw"; 22 22 } 23 - ); 23 + ) ++ [ 24 + # Fix vertical scrolling, see: https://lists.01.org/pipermail/powertop/2019-March/002046.html 25 + ./fix-vertical-scrolling.patch 26 + ]; 24 27 25 28 postPatch = '' 26 29 substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe"
+13
pkgs/os-specific/linux/powertop/fix-vertical-scrolling.patch
··· 1 + diff --git a/src/display.cpp b/src/display.cpp 2 + index 07227c5..7b3a7a2 100644 3 + --- a/src/display.cpp 4 + +++ b/src/display.cpp 5 + @@ -244,7 +244,7 @@ void cursor_down(void) 6 + w = tab_windows[tab_names[current_tab]]; 7 + if (w) { 8 + if (w->ypad_pos < 1000) { 9 + - if (tab_names[current_tab] == "Tunables" || "WakeUp") { 10 + + if (tab_names[current_tab] == "Tunables" || tab_names[current_tab] == "WakeUp") { 11 + if ((w->cursor_pos + 7) >= LINES) { 12 + prefresh(w->win, ++w->ypad_pos, w->xpad_pos, 13 + 1, 0, LINES - 3, COLS - 1);