aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2021-01-28 12:48:02 +0100
committerDaniel Lange <DLange@git.local>2021-01-28 12:48:02 +0100
commitb3648656a02006d3b231d905e36f11cba17f9c19 (patch)
tree7e48b63214dd6b3129244b830c301daf2bbf91da
parent6a6181d4cc31e6a5c16eb8b16b3560c1b000eb97 (diff)
downloaddebian_htop-b3648656a02006d3b231d905e36f11cba17f9c19.tar.gz
debian_htop-b3648656a02006d3b231d905e36f11cba17f9c19.tar.bz2
debian_htop-b3648656a02006d3b231d905e36f11cba17f9c19.zip
Fix mouse use for Infoscreens
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/0006-fix-infoscreen-mouse.patch41
-rw-r--r--debian/patches/series1
3 files changed, 48 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 29ba24a..f4e7561 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+htop (3.0.5-4) UNRELEASED; urgency=medium
+
+ * Fix mouse use / scrolling in Infoscreens
+
+ -- Daniel Lange <DLange@debian.org> Thu, 28 Jan 2021 12:46:00 +0100
+
htop (3.0.5-3) unstable; urgency=medium
[ Daniel Lange ]
diff --git a/debian/patches/0006-fix-infoscreen-mouse.patch b/debian/patches/0006-fix-infoscreen-mouse.patch
new file mode 100644
index 0000000..e917fbc
--- /dev/null
+++ b/debian/patches/0006-fix-infoscreen-mouse.patch
@@ -0,0 +1,41 @@
+Backport Infoscreen mouse improvements
+--- a/InfoScreen.c
++++ b/InfoScreen.c
+@@ -109,12 +109,21 @@
+ MEVENT mevent;
+ int ok = getmouse(&mevent);
+ if (ok == OK) {
+- if (mevent.y >= panel->y && mevent.y < LINES - 1) {
+- Panel_setSelected(panel, mevent.y - panel->y + panel->scrollV);
+- ch = 0;
+- } else if (mevent.y == LINES - 1) {
+- ch = IncSet_synthesizeEvent(this->inc, mevent.x);
++ if (mevent.bstate & BUTTON1_RELEASED) {
++ if (mevent.y >= panel->y && mevent.y < LINES - 1) {
++ Panel_setSelected(panel, mevent.y - panel->y + panel->scrollV - 1);
++ ch = 0;
++ } else if (mevent.y == LINES - 1) {
++ ch = IncSet_synthesizeEvent(this->inc, mevent.x);
++ }
+ }
++ #if NCURSES_MOUSE_VERSION > 1
++ else if (mevent.bstate & BUTTON4_PRESSED) {
++ ch = KEY_WHEELUP;
++ } else if (mevent.bstate & BUTTON5_PRESSED) {
++ ch = KEY_WHEELDOWN;
++ }
++ #endif
+ }
+ }
+
+--- a/TraceScreen.c
++++ b/TraceScreen.c
+@@ -42,7 +42,7 @@
+ this->tracing = true;
+ FunctionBar* fuBar = FunctionBar_new(TraceScreenFunctions, TraceScreenKeys, TraceScreenEvents);
+ CRT_disableDelay();
+- return (TraceScreen*) InfoScreen_init(&this->super, process, fuBar, LINES - 2, "");
++ return (TraceScreen*) InfoScreen_init(&this->super, process, fuBar, LINES - 2, " ");
+ }
+
+ void TraceScreen_delete(Object* cast) {
diff --git a/debian/patches/series b/debian/patches/series
index f7cc3c3..8741e28 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
0003-fix-hurd-build.patch
0004-fix-kfreebsd-build.patch
0005-fix-sorting.patch
+0006-fix-infoscreen-mouse.patch

© 2014-2024 Faster IT GmbH | imprint | privacy policy