mirror of
https://github.com/yattee/yattee.git
synced 2024-12-24 22:43:41 +00:00
Fix player window on Mac
This commit is contained in:
parent
1912c8b845
commit
3467b7205c
@ -33,7 +33,11 @@ enum Windows: String, CaseIterable {
|
|||||||
func open() {
|
func open() {
|
||||||
switch self {
|
switch self {
|
||||||
case .player:
|
case .player:
|
||||||
NSWorkspace.shared.open(URL(string: "yattee://\(location)")!)
|
if let window = Self.playerWindow {
|
||||||
|
window.makeKeyAndOrderFront(self)
|
||||||
|
} else {
|
||||||
|
NSWorkspace.shared.open(URL(string: "yattee://\(location)")!)
|
||||||
|
}
|
||||||
case .main:
|
case .main:
|
||||||
Self.main.focus()
|
Self.main.focus()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user