]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkstatusicon.c
Bug 659406 - Abstract what triggers a context menu
[~andy/gtk] / gtk / gtkstatusicon.c
index 8d5a0efbb2796b14b1c60d25aa157a8698f39375..27a2b144d97c7fa4cbb4b8ce53edab036d6d697c 100644 (file)
@@ -1810,14 +1810,14 @@ gtk_status_icon_button_press (GtkStatusIcon  *status_icon,
   if (handled)
     return TRUE;
 
-  if (event->button == 1 && event->type == GDK_BUTTON_PRESS)
+  if (_gtk_button_event_triggers_context_menu (event))
     {
-      emit_activate_signal (status_icon);
+      emit_popup_menu_signal (status_icon, event->button, event->time);
       return TRUE;
     }
-  else if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
+  else if (event->button == 1 && event->type == GDK_BUTTON_PRESS)
     {
-      emit_popup_menu_signal (status_icon, event->button, event->time);
+      emit_activate_signal (status_icon);
       return TRUE;
     }