window: make new BUTTON2_PRESSED definition more clear

This commit is contained in:
Andrzej Rybczak
2010-07-31 19:22:49 +02:00
parent dc8aff65a2
commit 087245ecda

View File

@@ -49,10 +49,10 @@
# define KEY_BACKSPACE 8 # define KEY_BACKSPACE 8
#else #else
// NOTICE: redefine BUTTON2_PRESSED as it doesn't always work, I noticed // NOTICE: redefine BUTTON2_PRESSED as it doesn't always work, I noticed
// that it sometimes returns 134217728 instead of expected mask, so the // that it sometimes returns 134217728 (2^27) instead of expected mask, so the
// modified define does it right but is rather experimental. // modified define does it right but is rather experimental.
# undef BUTTON2_PRESSED # undef BUTTON2_PRESSED
# define BUTTON2_PRESSED (NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_PRESSED) | 134217728U) # define BUTTON2_PRESSED (NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_PRESSED) | (1U << 27))
#endif // USE_PDCURSES #endif // USE_PDCURSES
#ifdef _UTF8 #ifdef _UTF8