From 590ec2138d2e1c82a6118c017aefda2f5fd5e67a Mon Sep 17 00:00:00 2001 From: Aleksandr Mezin Date: Sun, 4 Jun 2023 06:13:52 +0300 Subject: [PATCH] extension: don't trust D-Bus activation Manually ensure the app is running before calling its actions. Both dbus-daemon and dbus-broker are somewhat broken: - https://gitlab.freedesktop.org/dbus/dbus/-/issues/458 - https://github.com/bus1/dbus-broker/issues/314 Fixes https://github.com/ddterm/gnome-shell-extension-ddterm/issues/433 --- ddterm/shell/extension.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ddterm/shell/extension.js b/ddterm/shell/extension.js index 90acc993..e8bad9b2 100644 --- a/ddterm/shell/extension.js +++ b/ddterm/shell/extension.js @@ -416,10 +416,14 @@ function activate() { if (!window_manager.current_window) window_manager.update_monitor_index(); - if (window_manager.current_window) + if (window_manager.current_window) { Main.activateWindow(window_manager.current_window); - else + } else { + if (!app_dbus.available) + spawn_app(); + app_dbus.action_group.activate_action('show', null); + } } function set_skip_taskbar() {