Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
xjbeta committed Feb 19, 2021
2 parents 57a27b1 + 9955dc8 commit 3c65ceb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions QuickTime ASS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
CODE_SIGN_ENTITLEMENTS = "QuickTime ASS/QuickTime_ASS.entitlements";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -443,7 +443,7 @@
CODE_SIGN_ENTITLEMENTS = "QuickTime ASS/QuickTime_ASS.entitlements";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down
11 changes: 11 additions & 0 deletions QuickTime ASS/MainWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ class MainWindowController: NSWindowController {
case .focusedWindowChanged:
guard let t: String? = try element.attribute(.title) else { return }
self.targeWindowForced = t == self.targeWindowTitle
case .uiElementDestroyed:
self.targeWindowForced = false
let item = (NSApp.delegate as? AppDelegate)?.subtitleFileItem
item?.title = ""
item?.isHidden = true

self.targeProcessIdentifier = nil
self.targeWindowTitle = nil
self.targePlayerWindow = nil
self.observer?.stop()
default:
break
}
Expand All @@ -166,6 +176,7 @@ class MainWindowController: NSWindowController {
}) else { return }
try observer?.addNotification(.moved, forElement: window)
try observer?.addNotification(.resized, forElement: window)
try observer?.addNotification(.uiElementDestroyed, forElement: window)

try observer?.addNotification(.focusedWindowChanged, forElement: .init(app.element))

Expand Down

0 comments on commit 3c65ceb

Please sign in to comment.