diff --git a/bec_widgets/cli/client_utils.py b/bec_widgets/cli/client_utils.py index cac7b197..21276773 100644 --- a/bec_widgets/cli/client_utils.py +++ b/bec_widgets/cli/client_utils.py @@ -561,7 +561,7 @@ class BECGuiClient(RPCBase): if self.launcher and len(self._top_level) == 0: self.launcher._run_rpc("show") # pylint: disable=protected-access for window in self._top_level.values(): - window.show() + window.raise_window() def _show_all(self): with wait_for_server(self): @@ -580,7 +580,7 @@ class BECGuiClient(RPCBase): if self.launcher and len(self._top_level) == 0: self.launcher._run_rpc("raise") # pylint: disable=protected-access for window in self._top_level.values(): - window._run_rpc("raise") # type: ignore[attr-defined] + window.raise_window() def _raise_all(self): with wait_for_server(self): diff --git a/bec_widgets/cli/rpc/rpc_base.py b/bec_widgets/cli/rpc/rpc_base.py index a89bbdd8..2523789e 100644 --- a/bec_widgets/cli/rpc/rpc_base.py +++ b/bec_widgets/cli/rpc/rpc_base.py @@ -210,6 +210,10 @@ class RPCBase: # Use explicit call to ensure action name is 'raise' (not 'raise_') return self._run_rpc("raise") + def hide(self): + """Hide this widget (or its container).""" + return self._run_rpc("hide") + def _run_rpc( self, method,