window: do not redefine BUTTON5_PRESSED if NCURSES_MOUSE_VERSION > 1
This commit is contained in:
@@ -95,16 +95,16 @@ const int KEY_BACKSPACE_2 = 127;
|
|||||||
#undef KEY_ENTER
|
#undef KEY_ENTER
|
||||||
const int KEY_ENTER = 13;
|
const int KEY_ENTER = 13;
|
||||||
|
|
||||||
#if NCURSES_SEQUENCE_ESCAPING
|
|
||||||
#if NCURSES_MOUSE_VERSION == 1
|
#if NCURSES_MOUSE_VERSION == 1
|
||||||
|
# if NCURSES_SEQUENCE_ESCAPING
|
||||||
// NOTICE: define BUTTON5_PRESSED to be BUTTON2_PRESSED with additional mask
|
// NOTICE: define BUTTON5_PRESSED to be BUTTON2_PRESSED with additional mask
|
||||||
// (I noticed that it sometimes returns 134217728 (2^27) instead of expected
|
// (I noticed that it sometimes returns 134217728 (2^27) instead of expected
|
||||||
// mask, so the modified define does it right.
|
// mask, so the modified define does it right.
|
||||||
# define BUTTON5_PRESSED (BUTTON2_PRESSED | (1U << 27))
|
# define BUTTON5_PRESSED (BUTTON2_PRESSED | (1U << 27))
|
||||||
# endif // NCURSES_MOUSE_VERSION == 1
|
|
||||||
# else
|
# else
|
||||||
# define BUTTON5_PRESSED (1U << 27)
|
# define BUTTON5_PRESSED (1U << 27)
|
||||||
# endif // NCURSES_SEQUENCE_ESCAPING
|
# endif // NCURSES_SEQUENCE_ESCAPING
|
||||||
|
#endif // NCURSES_MOUSE_VERSION == 1
|
||||||
|
|
||||||
// undefine macros with colliding names
|
// undefine macros with colliding names
|
||||||
#undef border
|
#undef border
|
||||||
|
|||||||
Reference in New Issue
Block a user