summaryrefslogtreecommitdiff
path: root/sci-visualization/gnuplot/files/gnuplot-5.2.8-caca.patch
blob: 2ce464f04499aa08cc6cf414ab388822ec8aa166 (plain)
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
Patch backported from branch-5-4-stable.
https://bugs.gentoo.org/690014

--- gnuplot-5.2.8-orig/term/caca.trm
+++ gnuplot-5.2.8/term/caca.trm
@@ -1909,8 +1909,11 @@
 	CACA_result loop = CACA_loop;
 	caca_event_t ev;
 	const int event_mask =
-		CACA_EVENT_KEY_PRESS | CACA_EVENT_RESIZE |  CACA_EVENT_QUIT |
-		CACA_EVENT_MOUSE_MOTION | CACA_EVENT_MOUSE_PRESS | CACA_EVENT_MOUSE_RELEASE;
+		CACA_EVENT_KEY_PRESS | CACA_EVENT_RESIZE |  CACA_EVENT_QUIT
+#ifdef USE_MOUSE
+		| CACA_EVENT_MOUSE_MOTION | CACA_EVENT_MOUSE_PRESS | CACA_EVENT_MOUSE_RELEASE
+#endif
+		;
 	static int mx = 0, my = 0; /* current mouse position */
 	static unsigned long last_event_time = 0;
 
@@ -2577,11 +2580,13 @@
 		}
 	}
 
+#ifdef USE_MOUSE
 	if (changed) {
 		/* Replot only if something changed. */
 		CACA_zoom_or_replot = TRUE;
 		process_event(GE_replot, 0, 0, 0, 0, 0);
 	}
+#endif
 }