aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/0006-fix-infoscreen-mouse.patch
blob: e917fbc5dfc1d41982568e8d0492f062ddb3441b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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) {

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