aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/command.c4
-rw-r--r--src/conf.c5
-rw-r--r--src/options.h7
-rw-r--r--src/screen.c3
-rw-r--r--src/screen_help.c17
5 files changed, 13 insertions, 23 deletions
diff --git a/src/command.c b/src/command.c
index 6cf3bf172..c8d43d99d 100644
--- a/src/command.c
+++ b/src/command.c
@@ -401,8 +401,8 @@ get_keyboard_command_with_timeout(int ms)
return CMD_NONE;
#ifdef HAVE_GETMOUSE
- // if( key==KEY_MOUSE )
- // return CMD_MOUSE_EVENT;
+ if( key==KEY_MOUSE )
+ return CMD_MOUSE_EVENT;
#endif
return get_key_command(key);
diff --git a/src/conf.c b/src/conf.c
index 9dacbfbee..f1f1223a3 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -57,6 +57,7 @@
#define CONF_AUDIBLE_BELL "audible-bell"
#define CONF_VISIBLE_BELL "visible-bell"
#define CONF_XTERM_TITLE "set-xterm-title"
+#define CONF_MOUSE_EVENTS "enable-mouse"
typedef enum {
KEY_PARSER_UNKNOWN,
@@ -462,6 +463,10 @@ read_rc_file(char *filename, options_t *options)
{
options->enable_xterm_title = str2bool(value);
}
+ else if( !strcasecmp(CONF_MOUSE_EVENTS, name) )
+ {
+ options->enable_mouse_events = str2bool(value);
+ }
else
{
match_found = 0;
diff --git a/src/options.h b/src/options.h
index 5bc24f38d..9cbe38675 100644
--- a/src/options.h
+++ b/src/options.h
@@ -20,9 +20,10 @@ typedef struct
gboolean auto_center;
gboolean wide_cursor;
gboolean enable_colors;
- gboolean audible_bell; /* not implemented */
- gboolean visible_bell; /* not implemented */
- gboolean enable_xterm_title; /* not implemented */
+ gboolean audible_bell;
+ gboolean visible_bell;
+ gboolean enable_xterm_title;
+ gboolean enable_mouse_events;
} options_t;
diff --git a/src/screen.c b/src/screen.c
index c2c1e7fda..9ea46f739 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -478,7 +478,8 @@ screen_init(mpdclient_t *c)
timeout(SCREEN_TIMEOUT);
/* initialize mouse support */
#ifdef HAVE_GETMOUSE
- mousemask(ALL_MOUSE_EVENTS, NULL);
+ if( options.enable_mouse_events )
+ mousemask(ALL_MOUSE_EVENTS, NULL);
#endif
if( COLS<SCREEN_MIN_COLS || LINES<SCREEN_MIN_ROWS )
diff --git a/src/screen_help.c b/src/screen_help.c
index 4d1db1594..68021c651 100644
--- a/src/screen_help.c
+++ b/src/screen_help.c
@@ -111,23 +111,6 @@ static help_text_row_t help_text[] =
{ 0, CMD_SCREEN_UPDATE, NULL },
{ 0, CMD_NONE, NULL },
- { 0, CMD_NONE, NULL },
- { 1, CMD_NONE, "ncmpc build information" },
- { 2, CMD_NONE, NULL },
- { 0, CMD_NONE, " Version : " VERSION },
- { 0, CMD_NONE, " Configuration dirs : ~/.ncmpc, " SYSCONFDIR "/" PACKAGE },
-#ifdef ENABLE_NLS
- { 0, CMD_NONE, "NLS support : yes" },
-#else
- { 0, CMD_NONE, "NLS support : no" },
-#endif
-#ifdef ENABLE_KEYDEF_SCREEN
- { 0, CMD_NONE, "Key Editor : yes" },
-#else
- { 0, CMD_NONE, "Key Editor : no" },
-#endif
-
- { 0, CMD_NONE, NULL },
{-1, CMD_NONE, NULL }
};