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

Rémi Denis-Courmont remi at remlab.net
Mon Nov 7 17:31:44 CET 2016


Le maanantaina 7. marraskuuta 2016, 17.17.20 EET Kai Uwe Broulik a écrit :
> 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;

Are you sure this only gets called when the Qt interface is running?

> 
>       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;


-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list