Skip to content

Commit

Permalink
🔨 Move both window activation and hiding logic to AppWindowManager
Browse files Browse the repository at this point in the history
  • Loading branch information
guiyanakuang committed Apr 26, 2024
1 parent 0eb366c commit 69ee086
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ object DesktopAppWindowManager : AppWindowManager {
override fun activeMainWindow() {
if (currentPlatform().isMacos()) {
logger.info { "bringToFront Clipevery" }
MacosApi.INSTANCE.bringToFront("Clipevery")
MacosApi.INSTANCE.bringToFront(mainWindowTitle)
}
showMainWindow = true
}

override fun activeSearchWindow() {
val currentPlatform = currentPlatform()
if (currentPlatform.isMacos()) {
prevAppName = MacosApi.INSTANCE.bringToFront("Clipevery Search")
prevAppName = MacosApi.INSTANCE.bringToFront(searchWindowTitle)
} else if (currentPlatform.isWindows()) {
// todo windows
} else if (currentPlatform.isLinux()) {
Expand All @@ -94,7 +94,7 @@ object DesktopAppWindowManager : AppWindowManager {
override fun unActiveMainWindow() {
if (currentPlatform().isMacos()) {
logger.info { "bringToBack Clipevery" }
MacosApi.INSTANCE.bringToBack("Clipevery")
MacosApi.INSTANCE.bringToBack(mainWindowTitle)
}
showMainWindow = false
}
Expand Down

0 comments on commit 69ee086

Please sign in to comment.