[Xfce4-commits] <xfce4-panel:devel> Change launcher menu launch from button release -> press.

Nick Schermer noreply at xfce.org
Mon Feb 22 13:26:02 CET 2010


Updating branch refs/heads/devel
         to 0bb1909932c63e55226a5401d49b7dd47f73d5ad (commit)
       from 10a5d3652ad880ad76ade00ded3832f7245c24ec (commit)

commit 0bb1909932c63e55226a5401d49b7dd47f73d5ad
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Feb 22 12:41:04 2010 +0100

    Change launcher menu launch from button release -> press.
    
    The avoids unwanted launches when the menu appears under the
    pointer on popup.

 plugins/launcher/launcher.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index b9557ff..efa0888 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -77,7 +77,7 @@ static GdkPixbuf *launcher_plugin_tooltip_pixbuf                (GdkScreen
                                                                  const gchar          *icon_name);
 static void       launcher_plugin_menu_deactivate               (GtkWidget            *menu,
                                                                  LauncherPlugin       *plugin);
-static gboolean   launcher_plugin_menu_item_released            (GtkMenuItem          *widget,
+static gboolean   launcher_plugin_menu_item_pressed             (GtkMenuItem          *widget,
                                                                  GdkEventButton       *event,
                                                                  GarconMenuItem       *item);
 static void       launcher_plugin_menu_item_drag_data_received  (GtkWidget            *widget,
@@ -1318,9 +1318,9 @@ launcher_plugin_menu_deactivate (GtkWidget      *menu,
 
 
 static gboolean
-launcher_plugin_menu_item_released (GtkMenuItem      *widget,
-                                    GdkEventButton   *event,
-                                    GarconMenuItem   *item)
+launcher_plugin_menu_item_pressed (GtkMenuItem      *widget,
+                                   GdkEventButton   *event,
+                                   GarconMenuItem   *item)
 {
   LauncherPlugin *plugin;
   GdkScreen      *screen;
@@ -1443,8 +1443,8 @@ launcher_plugin_menu_construct (LauncherPlugin *plugin)
       gtk_widget_show (mi);
       gtk_drag_dest_set (mi, GTK_DEST_DEFAULT_ALL, drop_targets,
                          G_N_ELEMENTS (drop_targets), GDK_ACTION_COPY);
-      g_signal_connect (G_OBJECT (mi), "button-release-event",
-          G_CALLBACK (launcher_plugin_menu_item_released), item);
+      g_signal_connect (G_OBJECT (mi), "button-press-event",
+          G_CALLBACK (launcher_plugin_menu_item_pressed), item);
       g_signal_connect (G_OBJECT (mi), "drag-data-received",
           G_CALLBACK (launcher_plugin_menu_item_drag_data_received), item);
       g_signal_connect (G_OBJECT (mi), "drag-leave",



More information about the Xfce4-commits mailing list