Skip to content

Commit 623165a

Browse files
committed
Fix dashboard not in foreground
1 parent c7aa6ff commit 623165a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

manager.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ def windowEnumerationHandler(hwnd, top_windows):
258258
win32gui.EnumWindows(windowEnumerationHandler, top_windows)
259259
for i in top_windows:
260260
if "gwsl dashboard" in i[1].lower():
261-
print(i[0])
262261
win32gui.ShowWindow(i[0], 5)
263262
win32gui.SetForegroundWindow(i[0])
264263
break
@@ -392,7 +391,12 @@ def windowEnumerationHandler(hwnd, top_windows):
392391
# win32gui.MoveWindow(HWND, screensize[0] - WIDTH, screensize[1] - taskbar - HEIGHT, WIDTH, HEIGHT, True)
393392

394393
canvas = pygame.Surface([WIDTH, HEIGHT]) # , pygame.SRCALPHA)
395-
394+
try:
395+
win32gui.ShowWindow(HWND, 5)
396+
win32gui.SetForegroundWindow(HWND)
397+
except:
398+
pass
399+
396400
ui.set_size([WIDTH, HEIGHT])
397401
pygame.display.set_caption("GWSL Dashboard")
398402
ui.start_graphics(pygame, asset_dir)

0 commit comments

Comments
 (0)