Skip to content

Commit

Permalink
fix: compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
louis.pontoise authored and lwouis committed Mar 10, 2020
1 parent c5cbcdb commit 1faa74c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion alt-tab-macos/logic/Application.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private func axObserverCallback(observer: AXObserver, element: AXUIElement, noti
let application = Unmanaged<Application>.fromOpaque(applicationPointer!).takeUnretainedValue()
let app = App.shared as! App
let type = notificationName as String
debugPrint("OS event: " + type, element.title())
debugPrint("OS event: " + type, element.title() ?? "nil")
switch type {
case kAXApplicationActivatedNotification: eventApplicationActivated(app, element)
case kAXApplicationHiddenNotification, kAXApplicationShownNotification: eventApplicationHiddenOrShown(app, element, type)
Expand Down
4 changes: 2 additions & 2 deletions alt-tab-macos/logic/Window.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Window {
self.spaceIndex = Spaces.currentSpaceIndex
self.isOnAllSpaces = false
self.title = Window.bestEffortTitle(axUiElement, cgWindowId, application)
debugPrint("Adding window: " + title, application.runningApplication.bundleIdentifier, Spaces.currentSpaceId, Spaces.currentSpaceIndex)
debugPrint("Adding window: " + title, application.runningApplication.bundleIdentifier ?? "nil", Spaces.currentSpaceId, Spaces.currentSpaceIndex)
observeEvents()
}

Expand Down Expand Up @@ -104,7 +104,7 @@ class Window {
private func axObserverCallback(observer: AXObserver, element: AXUIElement, notificationName: CFString, _: UnsafeMutableRawPointer?) -> Void {
let type = notificationName as String
let app = App.shared as! App
debugPrint("OS event: " + type, element.title())
debugPrint("OS event: " + type, element.title() ?? "nil")
switch type {
case kAXUIElementDestroyedNotification: eventWindowDestroyed(app, element)
case kAXWindowMiniaturizedNotification, kAXWindowDeminiaturizedNotification: eventWindowMiniaturizedOrDeminiaturized(app, element, type)
Expand Down

0 comments on commit 1faa74c

Please sign in to comment.