← Commit history

v1.6.41: instant-minimize (disable min animation during launch) - imperceptible bg launch

John Lauer ·56307143bf ·3mo ago ·parent 2fc3d1b
5 files changed +66−14
BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.6.40\ No newline at end of file+1.6.41\ No newline at end of file
CHANGELOG.md+10
@@ -3,6 +3,16 @@ All notable changes to the Adom Desktop Fusion 360 bridge, newest first. Canonical: https://wiki.adom.inc/adom/adom-desktop-fusion-bridge ยท GitHub backup: `adom-inc/adom-desktop-fusion-bridge` +## 1.6.41 - 2026-07-06++- **Instant-minimize: disable the minimize ANIMATION during launch** so the focus-guard's minimize is+  a single-frame vanish, not the visible slide-down that read as a 'flash' (John). Combined with the+  1.6.40 seat auto-resolve (no more stuck sign-in retry loop = no repeated foregrounding) and the+  foreground-lock, a background launch should now be imperceptible. `SPI_SETANIMATION` off during the+  guard window, restored to the user's original value when it ends. (Chosen over virtual-desktop+  isolation, which proved un-shippable: Win11 virtual-desktop control is undocumented, per-build, and+  the driver won't even install cleanly - it would make the bridge brittle across Windows updates.)+ ## 1.6.40 - 2026-07-06  - **THE seat-dialog fix: `fusion_start` now auto-resolves "Active Sessions Exceeded" via UIA in the
adom-bridge-fusion-manifest.json+5−5
@@ -1,13 +1,13 @@ {   "manifest_version": 1,   "name": "fusion360",-  "version": "1.6.40",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-fusion-bridge/1.6.40/adom-bridge-fusion-v1.6.40.zip",-  "sha256": "f82a746b72475e247f420a14a7b67a313eca9c12d6a02dc5ed0cb57db960ede1",-  "size": 339593,+  "version": "1.6.41",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-fusion-bridge/1.6.41/adom-bridge-fusion-v1.6.41.zip",+  "sha256": "7d23f4362e609d733d59a49bc1be69e5515c6df81d6c87b1fd52012121ecdcf6",+  "size": 340280,   "verbPrefixes": [     "fusion_"   ],   "healthEndpoint": "/status",-  "released_at": "2026-07-06T12:56:14Z"+  "released_at": "2026-07-06T13:16:31Z" }
bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "fusion360",   "displayName": "Autodesk Fusion 360",-  "version": "1.6.40",+  "version": "1.6.41",   "description": "Drive Autodesk Fusion 360 from the cloud: launch Fusion, electronics board layout, design rules, exports (STEP/IGES/STL/3MF/USDZ/OBJ/DXF/DWG/Gerbers/BOM/CPL), fast APS server-indexed cloud search plus browse/recent/file-info/versions, cloud file download/upload and folder creation, and in-app parametric modeling (fusion_run_modeling_script). Never-charge: APS calls are capped to the free tier.",   "homepage": "https://wiki.adom.inc/adom/adom-desktop-fusion-bridge",   "author": "Adom Inc.",
fusion_detect.py+49−7
@@ -439,6 +439,40 @@ def _fusion_pids() -> set:  _SPI_GETFOREGROUNDLOCKTIMEOUT = 0x2000 _SPI_SETFOREGROUNDLOCKTIMEOUT = 0x2001+_SPI_GETANIMATION = 0x0048+_SPI_SETANIMATION = 0x0049+++class _ANIMATIONINFO(ctypes.Structure):+    _fields_ = [("cbSize", ctypes.c_uint), ("iMinAnimate", ctypes.c_int)]+++def _get_min_animate():+    """Current 'animate windows when minimizing/maximizing' setting (1=on), or None."""+    try:+        user32 = ctypes.windll.user32+        ai = _ANIMATIONINFO()+        ai.cbSize = ctypes.sizeof(_ANIMATIONINFO)+        user32.SystemParametersInfoW(_SPI_GETANIMATION, ai.cbSize, ctypes.byref(ai), 0)+        return int(ai.iMinAnimate)+    except Exception:+        return None+++def _set_min_animate(val) -> bool:+    """Turn the minimize/maximize ANIMATION on(1)/off(0). We turn it OFF during launch+    so the focus-guard's minimize is an INSTANT single-frame vanish rather than the+    visible slide-down that read as a 'flash' (John 2026-07-06). Restored to the user's+    original value when the launch window ends. Best-effort; no persist/broadcast."""+    try:+        user32 = ctypes.windll.user32+        ai = _ANIMATIONINFO()+        ai.cbSize = ctypes.sizeof(_ANIMATIONINFO)+        ai.iMinAnimate = int(val)+        user32.SystemParametersInfoW(_SPI_SETANIMATION, ai.cbSize, ctypes.byref(ai), 0)+        return True+    except Exception:+        return False   def _get_fg_lock_timeout():@@ -491,7 +525,7 @@ def _popen_fusion_background(exe_path: str):     )  -def _focus_guard(seconds: float = 150.0, restore_fg_lock=None):+def _focus_guard(seconds: float = 150.0, restore_fg_lock=None, restore_min_anim=None):     """For `seconds`, demote any Autodesk-FAMILY window that steals the foreground.      SURGICAL: only acts when the CURRENT foreground window belongs to an Autodesk@@ -535,17 +569,20 @@ def _focus_guard(seconds: float = 150.0, restore_fg_lock=None):         except Exception:             pass         time.sleep(0.1)-    # Launch window over: restore the user's original foreground-lock so normal apps-    # can foreground again (we only wanted the lock DURING Fusion's noisy startup).+    # Launch window over: restore the user's original foreground-lock + minimize+    # animation (we only changed them DURING Fusion's noisy startup).     if restore_fg_lock is not None:         _set_fg_lock_timeout(restore_fg_lock)+    if restore_min_anim is not None:+        _set_min_animate(restore_min_anim)  -def _start_focus_guard(seconds: float = 150.0, restore_fg_lock=None):+def _start_focus_guard(seconds: float = 150.0, restore_fg_lock=None, restore_min_anim=None):     """Fire-and-forget the focus guard on a daemon thread. Never raises."""     try:         threading.Thread(-            target=_focus_guard, args=(seconds, restore_fg_lock), daemon=True+            target=_focus_guard, args=(seconds, restore_fg_lock, restore_min_anim),+            daemon=True,         ).start()     except Exception:         pass@@ -587,13 +624,18 @@ def ensure_fusion_running(fusion_info: dict, wait_addin: bool = False) -> dict |         # end of the launch window.         _orig_fg_lock = _get_fg_lock_timeout()         _set_fg_lock_timeout(300000)+        # Disable the minimize ANIMATION so the guard's minimize is an INSTANT vanish+        # (no visible slide-down = no perceptible flash). Restored by the guard.+        _orig_min_anim = _get_min_animate()+        _set_min_animate(0)         # Launch MINIMIZED + NOT ACTIVATED (STARTUPINFO). DEVNULL on all three std         # streams + CREATE_NO_WINDOW: the bridge is a detached, console-less child of         # AD, so inherited handles are invalid.         _popen_fusion_background(exe_path)         # Reactive backstop: minimize any family window that still slips to foreground,-        # and restore the user's original foreground-lock when the launch window ends.-        _start_focus_guard(seconds=150.0, restore_fg_lock=_orig_fg_lock)+        # and restore the user's original foreground-lock + animation when done.+        _start_focus_guard(seconds=150.0, restore_fg_lock=_orig_fg_lock,+                           restore_min_anim=_orig_min_anim)     except Exception as e:         return {"success": False, "error": f"Failed to launch Fusion 360: {e}"}