From cd84f4d78cc6dde2a9ed3433e294d3cc29401e61 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 5 Jun 2014 02:49:20 -0700 Subject: [PATCH] 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. --- clientgui/BOINCListCtrl.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/clientgui/BOINCListCtrl.h b/clientgui/BOINCListCtrl.h index ba6ac0d70c..c65cfb02ba 100644 --- a/clientgui/BOINCListCtrl.h +++ b/clientgui/BOINCListCtrl.h @@ -31,12 +31,15 @@ // Virtual wxListCtrl does not reliably generate selection and // deselection events, so we must check for these differently. -#ifdef __WXMAC__ -// On Mac, check for selection / deselection on EVT_LEFT_DOWN. -#define USE_LIST_CACHE_HINT 0 -#else +// We get more events than we need using EVT_LIST_CACHE_HINT, +// so testing on mouse events is more efficient, but it doesn't +// work on Windows. +#ifdef __WXMSW__ // On Windows, check for selection / deselection on EVT_LIST_CACHE_HINT. #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 #if USE_NATIVE_LISTCONTROL