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:
@@ -106,6 +106,18 @@ class DisplayManager(QObject):
|
||||
self._bring_app(app_id, screen_geo)
|
||||
|
||||
self._layout.set(screen_serial, app_id)
|
||||
# Minimize apps not assigned to any screen (free GPU)
|
||||
self._minimize_unassigned()
|
||||
|
||||
def _minimize_unassigned(self) -> None:
|
||||
"""Minimize every running app that is not currently assigned to any screen."""
|
||||
assigned = set(
|
||||
self._layout.get(self._screen_serial(s))
|
||||
for s in self._app.screens()
|
||||
) - {None}
|
||||
for app_id in self._proc_mgr.running_ids():
|
||||
if app_id not in assigned:
|
||||
self._proc_mgr.minimize(app_id)
|
||||
|
||||
def _bring_app(self, app_id: str, geo: QRect) -> None:
|
||||
self._proc_mgr.bring_to_screen(app_id, geo.x(), geo.y(), geo.width(), geo.height())
|
||||
|
||||
Reference in New Issue
Block a user