osx - Get window id from a click listener with CGEventTap (objective-c) -


I'm trying to hear all the mouse clicks that the user creates. I need to know which window the user has Clicked (possibly by its CG Wandode) I am listening to all the clicks through CGEventTap, but now I do not know how to get a window that was clicked. Do you know some ways to retrieve Window ID from the CGEventRef object?

Plus, I know that by using [NSEvent addGlobalMonitorForEventsMatchingMask] by receiving [event window number], I can get Window ID, but I can not use this listener because someone For the reason, after the listener is set up, it blocks all the inputs in my own window, maybe anyone knows where it is coming from?

Thank you!

Do you windowNumber to CGEvent Are able to reach after being converted to a NSEvent ?

  CGEvent cgEvent = EVENT_FROM_YOUR_CGEVENT_TAP; NSEECC * NSEVEN = [NSCE Eventual Cause Event: CGIVE]; NSInteger Windonbars = [nsEvent windowNumber];    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -