mirror of https://github.com/BOINC/boinc.git
MGR: For detection of list selection and list deselection; trigger on EVT_LIST_CACHE_HINT only for Windows; both EVT_LIST_CACHE_HINT and mouse click events work on Mac and Linux, but EVT_LIST_CACHE_HINT generates far more events than we need, so using mouse click events is more efficient. Unfortunately, using mouse click events does not work on Windows.
This commit is contained in:
parent
7327ec1f11
commit
cd84f4d78c
|
@ -31,12 +31,15 @@
|
||||||
|
|
||||||
// Virtual wxListCtrl does not reliably generate selection and
|
// Virtual wxListCtrl does not reliably generate selection and
|
||||||
// deselection events, so we must check for these differently.
|
// deselection events, so we must check for these differently.
|
||||||
#ifdef __WXMAC__
|
// We get more events than we need using EVT_LIST_CACHE_HINT,
|
||||||
// On Mac, check for selection / deselection on EVT_LEFT_DOWN.
|
// so testing on mouse events is more efficient, but it doesn't
|
||||||
#define USE_LIST_CACHE_HINT 0
|
// work on Windows.
|
||||||
#else
|
#ifdef __WXMSW__
|
||||||
// On Windows, check for selection / deselection on EVT_LIST_CACHE_HINT.
|
// On Windows, check for selection / deselection on EVT_LIST_CACHE_HINT.
|
||||||
#define USE_LIST_CACHE_HINT 1
|
#define USE_LIST_CACHE_HINT 1
|
||||||
|
#else
|
||||||
|
// On Mac & Linux, check for selection / deselection on EVT_LEFT_DOWN.
|
||||||
|
#define USE_LIST_CACHE_HINT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if USE_NATIVE_LISTCONTROL
|
#if USE_NATIVE_LISTCONTROL
|
||||||
|
|
Loading…
Reference in New Issue