[vlc-devel] [PATCH] dbus control: Support Raise command

Kai Uwe Broulik kde at privat.broulik.de
Mon Nov 7 17:17:20 CET 2016


The infrastructure for bringing the window to the front was already in place
but it would not open the window when it was hidden in e.g. the system tray.
This patch addresses this by using the same mechanism that is used  
when restoring
from the system tray and changes CanRaise to return true.
---
  modules/control/dbus/dbus_root.c  | 2 +-
  modules/gui/qt/main_interface.cpp | 1 +
  2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/control/dbus/dbus_root.c  
b/modules/control/dbus/dbus_root.c
index 8b0ed71..a61b264 100644
--- a/modules/control/dbus/dbus_root.c
+++ b/modules/control/dbus/dbus_root.c
@@ -168,7 +168,7 @@ static int
  MarshalCanRaise( intf_thread_t *p_intf, DBusMessageIter *container )
  {
      VLC_UNUSED( p_intf );
-    const dbus_bool_t b_ret = FALSE;
+    const dbus_bool_t b_ret = TRUE;

      if (!dbus_message_iter_append_basic( container,  
DBUS_TYPE_BOOLEAN, &b_ret ))
          return VLC_ENOMEM;
diff --git a/modules/gui/qt/main_interface.cpp  
b/modules/gui/qt/main_interface.cpp
index 81eea83..9134be4 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -1689,6 +1689,7 @@ static int IntfRaiseMainCB( vlc_object_t *,  
const char *,
                              vlc_value_t, vlc_value_t, void *param )
  {
      intf_thread_t *p_intf = (intf_thread_t *)param;
+    p_intf->p_sys->p_mi->showUpdateSystrayMenu();
      p_intf->p_sys->p_mi->emitRaise();

      return VLC_SUCCESS;
-- 
2.7.4





More information about the vlc-devel mailing list