void DestroyApplicationNotifications() { if(!KWMFocus.Observer) return; AXObserverRemoveNotification(KWMFocus.Observer, KWMFocus.Application, kAXWindowMiniaturizedNotification); AXObserverRemoveNotification(KWMFocus.Observer, KWMFocus.Application, kAXWindowMovedNotification); AXObserverRemoveNotification(KWMFocus.Observer, KWMFocus.Application, kAXWindowResizedNotification); AXObserverRemoveNotification(KWMFocus.Observer, KWMFocus.Application, kAXTitleChangedNotification); CFRunLoopRemoveSource(CFRunLoopGetCurrent(), AXObserverGetRunLoopSource(KWMFocus.Observer), kCFRunLoopDefaultMode); CFRelease(KWMFocus.Observer); KWMFocus.Observer = NULL; CFRelease(KWMFocus.Application); KWMFocus.Application = NULL; }
void AXLibRemoveObserverNotification(ax_observer *Observer, CFStringRef Notification) { AXObserverRemoveNotification(Observer->Ref, Observer->Application->Ref, Notification); }