← Commit history

v1.9.15: largest-window screenshot pick

John Lauer ·f6966586e7 ·1mo ago ·parent f698cbe
4 files changed +22−11
BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.9.14\ No newline at end of file+1.9.15\ No newline at end of file
adom-bridge-fusion-manifest.json+4−4
@@ -1,10 +1,10 @@ {     "manifest_version": 1,     "name": "fusion360",-    "version": "1.9.14",-    "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.14/adom-bridge-fusion-v1.9.14.zip",-    "sha256": "86c66c2b8a90983b34be1f81c8fdf4707b38dbe094df0883d20c5f06876ac659",-    "size": 359359,+    "version": "1.9.15",+    "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.15/adom-bridge-fusion-v1.9.15.zip",+    "sha256": "45c8cc80b1a6a7b81a7c3a4dcab130d2e4e08f3220d31b8d1db3e7defe529a87",+    "size": 359588,     "verbPrefixes": [         "fusion_"     ],
bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "fusion360",   "displayName": "Autodesk Fusion 360",-  "version": "1.9.14",+  "version": "1.9.15",   "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/fusion-bridge",   "author": "Adom Inc.",
handlers/fusion_ui.py+16−5
@@ -139,8 +139,14 @@ def _send_input(*inputs): # --- Window finding ---  def _find_fusion_hwnd() -> int:-    """Find Fusion 360's main window by title containing 'Autodesk Fusion'."""-    result = [0]+    """Find Fusion 360's MAIN window: the LARGEST visible window titled 'Autodesk Fusion'.++    First-match was wrong (2026-08-15, caught by the demo tour's gallery): Fusion keeps+    tiny helper/ghost windows carrying the same title, and when one enumerates first the+    'screenshot' is a 236px title-bar sliver. The real main window is always the largest+    match by area, so pick that.+    """+    best = [0, 0]  # hwnd, area     WNDENUMPROC = ctypes.WINFUNCTYPE(         ctypes.c_bool, ctypes.wintypes.HWND, ctypes.wintypes.LPARAM     )@@ -152,15 +158,20 @@ def _find_fusion_hwnd() -> int:                 buf = ctypes.create_unicode_buffer(length + 1)                 user32.GetWindowTextW(hwnd, buf, length + 1)                 if "Autodesk Fusion" in buf.value:-                    result[0] = hwnd-                    return False+                    try:+                        l, t, r, b = _get_window_rect(hwnd)+                        area = max(0, r - l) * max(0, b - t)+                    except Exception:+                        area = 0+                    if area > best[1]:+                        best[0], best[1] = hwnd, area         return True      cb = WNDENUMPROC(callback)     _callbacks.append(cb)     user32.EnumWindows(cb, 0)     _callbacks.remove(cb)-    return result[0]+    return best[0]   def _find_qt_dialog_windows() -> list: