aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/screen_utils.c12
-rw-r--r--src/wreadln.c7
2 files changed, 15 insertions, 4 deletions
diff --git a/src/screen_utils.c b/src/screen_utils.c
index c9abc7b1f..7e2ba146c 100644
--- a/src/screen_utils.c
+++ b/src/screen_utils.c
@@ -65,9 +65,17 @@ screen_getch(WINDOW *w, char *prompt)
while( (key=wgetch(w)) == ERR )
;
-
+
+#ifdef HAVE_GETMOUSE
+ /* ignore mouse events */
+ if( key==KEY_MOUSE )
+ return screen_getch(w, prompt);
+#endif
+
if( key==KEY_RESIZE )
- screen_resize();
+ {
+ screen_resize();
+ }
noecho();
curs_set(0);
diff --git a/src/wreadln.c b/src/wreadln.c
index dd69b417a..3ebba7f2a 100644
--- a/src/wreadln.c
+++ b/src/wreadln.c
@@ -23,6 +23,7 @@
#include <ncurses.h>
#include <glib.h>
+#include "config.h"
#include "wreadln.h"
#define KEY_CTRL_A 1
@@ -162,8 +163,10 @@ wreadln(WINDOW *w,
switch (key)
{
- case ERR:
- /* ingnore errors */
+#ifdef HAVE_GETMOUSE
+ case KEY_MOUSE: /* ignore mouse events */
+#endif
+ case ERR: /* ingnore errors */
break;
case KEY_RESIZE: