function OpenXWindowInspector(context) PauseLuaThreads("XWindowInspector") CreateRealTimeThread(function() local target = terminal.desktop:GetMouseTarget(terminal.GetMousePos()) or terminal.desktop local gedTarget = GetParentOfKind(target, "GedApp") if gedTarget then context.dark_mode = gedTarget.dark_mode end local ged = OpenGedApp("XWindowInspector", terminal.desktop, context) if ged then GedXWindowInspectorSelectWindow(ged, target) else ResumeLuaThreads("XWindowInspector") end end) end function OnMsg.LuaThreadsPaused() ObjModified(terminal.desktop) -- updates the status text, which is bound with context "root" (which happens to be the desktop) end function GedThreadsPausedStatus() return AreLuaThreadsPaused() and "