Re: Screensaver can capture mouse events under Catalina
Re: Screensaver can capture mouse events under Catalina
- Subject: Re: Screensaver can capture mouse events under Catalina
- From: Sandor Szatmari via Cocoa-dev <email@hidden>
- Date: Tue, 26 May 2020 08:40:39 -0400
Gabriel,
> On May 26, 2020, at 04:21, Gabriel Zachmann <email@hidden> wrote:
>
> Thanks a lot for your response!
>
> Unfortunately, with -addGlobalMonitorForEventsMatchingMask: ,
> the event is still passed on to the higher-up objects, so that makes the
> screensaver engine terminate the screensaver immediately.
Does this mean you’re unable to set up a global event tap/monitor? If you are
able, how are you setting it up?
Sandor
>
> Best regards, Gabriel
>
>
>
>> On 26. May 2020, at 00:54, Sandor Szatmari <email@hidden>
>> wrote:
>>
>> Gabriel, (this is a dup reply, forgot to cc list)
>>
>> How are you setting up you global event monitor?
>>
>> I use this to handle catching mouse moved event when my app is not in the
>> foreground…. maybe you use something like this
>> Just watch out for a lot of events and making your app a CPU hog.
>>
>> [NSEvent addGlobalMonitorForEventsMatchingMask:NSMouseMovedMask
>> handler:
>> ^(NSEvent * _Nonnull event)
>> {
>> // Do stuff to handle events that I care about
>> }];
>>
>> Sandor
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden