fix(display-manager): lazy launch by default + minimize unassigned apps
- autolaunch default: True → False (on-demand only, saves GPU on startup) - add ProcessManager.minimize() to minimize a window to taskbar - add win32_utils.minimize_window() (SW_MINIMIZE via user32) - DisplayManager._minimize_unassigned(): after each app switch, minimize every running app not currently assigned to any screen, freeing iGPU resources (critical on J6412 UHD 600 with limited EUs) Background: J6412 Intel UHD 600 has only 16 EUs @ 800 MHz. Running AR-ECDIS (MapLibre GL) and GPS (OpenLayers) simultaneously consumes ~60% iGPU. By minimizing inactive apps Windows suspends their GPU presentation chain, dropping idle GPU load near zero. AR_electronics — AR-Autopilot Project
This commit is contained in:
@@ -90,6 +90,16 @@ class ProcessManager(QObject):
|
||||
win32_utils.move_and_maximize(hwnd, x, y, w, h)
|
||||
return True
|
||||
|
||||
def minimize(self, app_id: str) -> None:
|
||||
"""Minimize *app_id*'s window to free GPU resources."""
|
||||
handle = self._handles.get(app_id)
|
||||
if handle is None or not handle.is_running():
|
||||
return
|
||||
title_hint = self._config.apps.get(app_id, AppExeConfig()).title_hint
|
||||
hwnd = handle.find_hwnd(title_hint)
|
||||
if hwnd is not None:
|
||||
win32_utils.minimize_window(hwnd)
|
||||
|
||||
def is_running(self, app_id: str) -> bool:
|
||||
h = self._handles.get(app_id)
|
||||
return h is not None and h.is_running()
|
||||
|
||||
Reference in New Issue
Block a user