[Xfce4-commits] <xfce4-places-plugin:master> Fixed panel autohide locking (#7039, #9209).

Andrzej noreply at xfce.org
Mon Sep 3 07:50:02 CEST 2012


Updating branch refs/heads/master
         to e2dc769ea98497ac1b26f42eab5ef1db980e61f4 (commit)
       from 95aced303cb1ebc3cdddf80d1f15b7822da1a805 (commit)

commit e2dc769ea98497ac1b26f42eab5ef1db980e61f4
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Mon Sep 3 14:48:43 2012 +0900

    Fixed panel autohide locking (#7039, #9209).
    
    Ideally it should be possible to close the context menu
    and return to the main plugin menu (without closing all menus).
    This was difficult to implement and fixing autohide error
    was more important.

 panel-plugin/view.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/view.c b/panel-plugin/view.c
index 64f3952..b45ce2b 100644
--- a/panel-plugin/view.c
+++ b/panel-plugin/view.c
@@ -332,6 +332,16 @@ pview_cb_menu_item_context_act(GtkWidget *item, PlacesView *pd)
 
 }
 
+static void
+pview_cb_menu_context_deact(PlacesView *pd, GtkWidget *context_menu)
+{
+    g_assert(pd != NULL);
+    g_assert(pd->menu != NULL && GTK_IS_WIDGET(pd->menu));
+
+    DBG("Context menu deactivate");
+    gtk_menu_shell_deactivate(GTK_MENU_SHELL(pd->menu));
+}
+
 static gboolean
 pview_cb_menu_item_do_alt(PlacesView *pd, GtkWidget *menu_item)
 {
@@ -367,7 +377,7 @@ pview_cb_menu_item_do_alt(PlacesView *pd, GtkWidget *menu_item)
                        0, gtk_get_current_event_time());
 
         g_signal_connect_swapped(context, "deactivate",
-                                 G_CALLBACK(pview_open_menu), pd);
+                                 G_CALLBACK(pview_cb_menu_context_deact), pd);
 
     }
 


More information about the Xfce4-commits mailing list