mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-12 09:58:38 +00:00
Merge pull request #46 from ad/master
* trying to terminate app before forceTerminate (to prevent loosing of unsaved data)
This commit is contained in:
commit
aa95d1a1bd
@ -178,8 +178,10 @@ class AppScrubberTouchBarItem: NSCustomTouchBarItem, NSScrubberDelegate, NSScrub
|
|||||||
|
|
||||||
if (self.ticks > maxTicks) {
|
if (self.ticks > maxTicks) {
|
||||||
if let processIdentifier = applications[selected].pid {
|
if let processIdentifier = applications[selected].pid {
|
||||||
|
if !(NSRunningApplication(processIdentifier: processIdentifier)?.terminate())! {
|
||||||
NSRunningApplication(processIdentifier: processIdentifier)?.forceTerminate()
|
NSRunningApplication(processIdentifier: processIdentifier)?.forceTerminate()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
hf.tap(strong: 6)
|
hf.tap(strong: 6)
|
||||||
if let index = self.persistentAppIdentifiers.index(of: bundleIdentifier!) {
|
if let index = self.persistentAppIdentifiers.index(of: bundleIdentifier!) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user