xpra icon
Bug tracker and wiki

Changes between Initial Version and Version 1 of Ticket #1157, comment 15


Ignore:
Timestamp:
02/17/17 11:34:18 (4 years ago)
Author:
Antoine Martin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1157, comment 15

    initial v1  
    1 Why this took so long when the patch looked so promising? Well, it only catches global events, for our own window we should be using [https://developer.apple.com/reference/appkit/nsevent/1534971-addlocalmonitorforeventsmatching?language=objc addGlobalMonitorForEventsMatchingMask]. But this one doesn't work - for whatever reason.
     1Why this took so long when the patch looked so promising? Well, it only catches global events, for our own window we should be using [https://developer.apple.com/reference/appkit/nsevent/1534971-addlocalmonitorforeventsmatching?language=objc addLocalMonitorForEventsMatchingMask]. But this one doesn't work - for whatever reason.
    22So then I thought we could use [http://pygtk.org/pygtk2reference/class-gdkwindow.html#method-gdkwindow--add-filter gdk.Window.add_fitler], but this one only gives us an empty gdk event structure and not the raw nsevent which contains the data we need.
    33Onto implementing this in Cython, which proved so difficult to interface with the nested union structure defined in objective-c that I almost gave up. (used glue objective-c files instead)