mission control inconsistencies with activeSpaceDidChangeNotification

I registered an observer to NSWorkspace.shared() object for the activeSpaceDidChangeNotification event.


my initial expectation is that this event would only be trigggered when I swipe/switch to a different space.


however it seems like sometimes the event is also triggered when entering and leaving mission control.


this doesn't repro after I restarted my imac, but after a while it started happening again.


so what is the correct expected behavior for mission control? will they or will they not send this event?


alternatively, is there an API to notify when we are entering/leaving mission control?


I'm using xcode 8.3.2 on Sierra 10.12.6