Also, how might one fetch the hwnd of a docked gfx script that matches the hwnd returned by JS_Window_GetFocus() when the docked script is focused?
JS_Window_Find(title_passed_to_gfx_init, true) != JS_Window_GetFocus() when the docked script is focused. However this does work when the script is undocked and floating.
(I swear this used to work, in fact I even went out of my way to
add a comment to that effect but either I was wrong at the time or the behavior changed, because it doesn't seem to work anymore.)