Skip to content

Commit

Permalink
删除依赖里不需要的 pygetwindow
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Jun 12, 2024
1 parent 10642b4 commit 8321013
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
29 changes: 0 additions & 29 deletions app/view/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8321013

Please sign in to comment.