skelterjohn / go.wde

Windows, drawing and events for Go
217 stars 46 forks source link

cocoa: Support calling Stop() in response to a non-UI event #55

Closed remko closed 6 years ago

remko commented 6 years ago

Trigger a dummy event after Stop() was called

sqweek commented 6 years ago

Looks great, thanks!

There was one thing I had to change: NSEventTypeApplicationDefined doesn't exist before 10.12; I used NSApplicationDefined instead. Can you please confirm whether that still works on 10.12?

Also if you'd prefer a different name/email than the one from your commit to appear in AUTHORS (or if you'd rather not appear there) let me know :)

remko commented 6 years ago

NSApplicationDefined still works in 10.12 and 10.13. At some point, some #ifdefs may need to be added, because there are a bunch of >=10.12 deprecation warnings on enums (including that one now).

My name and email is just fine, thanks ;)

sqweek commented 6 years ago

Yeah it would be nice to cleanup the deprecation warinngs. I wonder if there is a better practice for developing libraries which can target both old and new OSX versions? It seems strange for each library to have to build its own #ifdef compatibility layer.