if the tap is explicitly disabled by code or by another program, let it remain disabled! this is different than the automatic "event tap was too slow therefore we stopped processing it" timeout which we want to re-enable after.
authorSam Lantinga <slouken@libsdl.org>
Sat, 26 Nov 2016 10:26:32 -0800
changeset 10655a303ec46889b
parent 10654 a9713e5c7788
child 10656 18f1e8b0737d
if the tap is explicitly disabled by code or by another program, let it remain disabled! this is different than the automatic "event tap was too slow therefore we stopped processing it" timeout which we want to re-enable after.
src/video/cocoa/SDL_cocoamousetap.m
     1.1 --- a/src/video/cocoa/SDL_cocoamousetap.m	Sat Nov 26 10:26:26 2016 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoamousetap.m	Sat Nov 26 10:26:32 2016 -0800
     1.3 @@ -69,11 +69,11 @@
     1.4  
     1.5      switch (type) {
     1.6          case kCGEventTapDisabledByTimeout:
     1.7 -        case kCGEventTapDisabledByUserInput:
     1.8              {
     1.9                  CGEventTapEnable(tapdata->tap, true);
    1.10                  return NULL;
    1.11              }
    1.12 +        case kCGEventTapDisabledByUserInput:
    1.13          default:
    1.14              break;
    1.15      }