< prev index next >

modules/javafx.graphics/src/main/native-glass/mac/GlassTouches.m

Print this page
*** 40,10 ***
--- 40,11 ---
      #define LOG(MSG, ...) GLASS_LOG(MSG, ## __VA_ARGS__);
  #endif
  
  
  static GlassTouches* glassTouches = nil;
+ static BOOL useEventTap = NO;
  
  
  @interface GlassTouches (hidden)
  
  - (void)releaseTouches;

*** 174,11 ***
      glassTouches = nil;
  }
  
  - (id)init
  {
!     BOOL useEventTap = YES;
      if (@available(macOS 10.15, *)) {
          useEventTap = NO;
      }
  
      self = [super init];
--- 175,11 ---
      glassTouches = nil;
  }
  
  - (id)init
  {
!     useEventTap = YES;
      if (@available(macOS 10.15, *)) {
          useEventTap = NO;
      }
  
      self = [super init];

*** 230,15 ***
  
  
  @implementation GlassTouches (hidden)
  - (void)terminateImpl
  {
-     BOOL useEventTap = YES;
-     if (@available(macOS 10.15, *)) {
-         useEventTap = NO;
-     }
- 
      if (useEventTap) {
          LOG("TOUCHES: terminateImpl eventTap=%p runLoopSource=%p\n", self->eventTap,
              self->runLoopSource);
  
          if (self->runLoopSource)
--- 231,10 ---

*** 258,15 ***
      [self releaseTouches];
  }
  
  - (void)enableTouchInputEventTap
  {
-     BOOL useEventTap = YES;
-     if (@available(macOS 10.15, *)) {
-         useEventTap = NO;
-     }
- 
      if (useEventTap) {
          CGEventTapEnable(self->eventTap, true);
      }
  }
  
--- 254,10 ---
< prev index next >