diff --git a/app/view/main_window.py b/app/view/main_window.py index 6e2ef15..3a7eafe 100644 --- a/app/view/main_window.py +++ b/app/view/main_window.py @@ -10,7 +10,6 @@ import asyncio from aiohttp.client_exceptions import ClientConnectorError from qasync import asyncClose, asyncSlot -import pygetwindow as gw from PyQt5.QtCore import Qt, pyqtSignal, QSize from PyQt5.QtGui import QIcon, QImage from PyQt5.QtWidgets import QApplication, QSystemTrayIcon @@ -360,34 +359,6 @@ def __showWaitingMessageBox(self): signalBus.terminateListeners.emit() sys.exit() - def gameStartMinimize(self): - srcWindow = None - - while True: - time.sleep(1) - - if not cfg.get(cfg.enableGameStartMinimize): - continue - activaWindow = gw.getActiveWindow() - - if not activaWindow: - continue - activeWindowTitle = activaWindow.title - - # 有窗口切换发生, 并且与 LOL 有关 - if (srcWindow != activeWindowTitle - and "League of Legends (TM) Client" in (activeWindowTitle, srcWindow)): - - # 进入游戏窗口, 隐藏 Seraphine - if srcWindow == "League of Legends (TM) Client": - self.mainWindowHide.emit(False) - else: - # 切出游戏窗口, 显示 Seraphine - self.mainWindowHide.emit(True) - # self.activateWindow() - - srcWindow = activeWindowTitle - def __initSystemTray(self): self.trayIcon = QSystemTrayIcon(self) self.trayIcon.setToolTip("Seraphine") diff --git a/requirements.txt b/requirements.txt index 9b478e8..d17f61e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,5 @@ PyQt5-sip==12.12.1 PyQt-Fluent-Widgets==1.5.7 Requests==2.32.3 aiohttp==3.9.5 -pygetwindow==0.0.9 psutil==5.9.8 qasync==0.27.1 \ No newline at end of file