Repair context menu on launchbutton and on menu plugin.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Mon, 18 Aug 2014 00:38:28 +0000 (03:38 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Mon, 18 Aug 2014 00:38:28 +0000 (03:38 +0300)
plugins/launchtaskbar.c
plugins/menu.c

index 55f57c4..c26c716 100644 (file)
@@ -340,8 +340,9 @@ static gboolean launchbutton_press_event(GtkWidget * widget, GdkEventButton * ev
             lxpanel_plugin_show_config_dialog(b->p->plugin);
         else
             lxpanel_launch_path(b->p->panel, fm_file_info_get_path(b->fi));
+        return TRUE;
     }
-    return TRUE;
+    return FALSE;
 }
 
 /* Handler for "drag-motion" event from launchtaskbar button. */
index f6769c6..accc1f0 100644 (file)
@@ -664,12 +664,13 @@ my_button_pressed(GtkWidget *widget, GdkEventButton *event, menup *m)
     GtkAllocation allocation;
     gtk_widget_get_allocation(GTK_WIDGET(widget), &allocation);
 
-    if ((event->type == GDK_BUTTON_PRESS)
+    if ((event->type == GDK_BUTTON_PRESS) && event->button == 1
           && (event->x >=0 && event->x < allocation.width)
           && (event->y >=0 && event->y < allocation.height)) {
         show_menu( widget, m, event->button, event->time );
+        RET(TRUE);
     }
-    RET(TRUE);
+    RET(FALSE);
 }
 
 static gboolean show_system_menu_idle(gpointer user_data)