From 2bb9ced3d6de4efd5957b366fe9923c008a92d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Tue, 26 Mar 2013 02:01:28 +0100 Subject: [PATCH] ctk-curses: Guard ncurses-specific mouse function calls The mouse support is ncurses-specific so guard it with proper #ifdef. --- platform/native/ctk/ctk-curses.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/native/ctk/ctk-curses.c b/platform/native/ctk/ctk-curses.c index 4670ebffb..84e424422 100644 --- a/platform/native/ctk/ctk-curses.c +++ b/platform/native/ctk/ctk-curses.c @@ -76,7 +76,9 @@ ctrlhandler(int sig) void console_init(void) { +#ifdef NCURSES_MOUSE_VERSION mmask_t oldmask; +#endif static unsigned char done; if(done) { @@ -104,8 +106,10 @@ console_init(void) intrflush(stdscr, FALSE); keypad(stdscr, TRUE); +#ifdef NCURSES_MOUSE_VERSION /* done here because ctk_mouse_init() is called before anyway */ mousemask(ALL_MOUSE_EVENTS, &oldmask); +#endif screensize(&width, &height); @@ -347,6 +351,7 @@ console_readkey(int k) key = (ctk_arch_key_t) k; /*fprintf(stderr, "key: %d\n", k); */ switch (k) { +#ifdef NCURSES_MOUSE_VERSION case KEY_MOUSE: { MEVENT event; @@ -362,6 +367,7 @@ console_readkey(int k) } return; } +#endif case KEY_LEFT: key = CH_CURS_LEFT; break;