瀏覽代碼

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.

Sam Lantinga 9 年之前
父節點
當前提交
51ccc9ed8c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/video/cocoa/SDL_cocoamousetap.m

+ 1 - 1
src/video/cocoa/SDL_cocoamousetap.m

@@ -69,11 +69,11 @@ Cocoa_MouseTapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event
 
 
     switch (type) {
     switch (type) {
         case kCGEventTapDisabledByTimeout:
         case kCGEventTapDisabledByTimeout:
-        case kCGEventTapDisabledByUserInput:
             {
             {
                 CGEventTapEnable(tapdata->tap, true);
                 CGEventTapEnable(tapdata->tap, true);
                 return NULL;
                 return NULL;
             }
             }
+        case kCGEventTapDisabledByUserInput:
         default:
         default:
             break;
             break;
     }
     }