aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-07-03 13:02:42 +0000
committerKalle Wallin <kaw@linux.se>2004-07-03 13:02:42 +0000
commitbb2b7a65ed6ce964527e07843ec0ed86f0b45220 (patch)
tree3b133cd621de0f9e72acf3628cab73c32da54fa8 /src
parentb268b9992faa303d6283c5a88ba460b5fd73cef6 (diff)
downloadmpd-bb2b7a65ed6ce964527e07843ec0ed86f0b45220.tar.gz
mpd-bb2b7a65ed6ce964527e07843ec0ed86f0b45220.tar.xz
mpd-bb2b7a65ed6ce964527e07843ec0ed86f0b45220.zip
Ignore mouse events in wreadln, screen_getch
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1778 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-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: