Skip to content
Permalink
Browse files

Fix player can't quit when the mainWindow is hidden due to pip

  • Loading branch information...
alejx committed Apr 5, 2019
1 parent 5cf3010 commit 4830603536265071bff790a9c90eba3dbf4d6553
Showing with 1 addition and 1 deletion.
  1. +1 −1 iina/AppDelegate.swift
@@ -245,11 +245,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {

func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
guard PlayerCore.active.mainWindow.isWindowLoaded || PlayerCore.active.initialWindow.isWindowLoaded else { return false }
guard !PlayerCore.active.mainWindow.isWindowHidden else { return false }
return Preference.bool(for: .quitWhenNoOpenedWindow)
}

func applicationShouldTerminate(_ sender: NSApplication) -> NSApplication.TerminateReply {
guard !PlayerCore.active.mainWindow.isWindowHidden else { return .terminateCancel }
Logger.log("App should terminate")
for pc in PlayerCore.playerCores {
pc.terminateMPV()

0 comments on commit 4830603

Please sign in to comment.
You can’t perform that action at this time.