Commit 90e938bf authored by Javier Jardón's avatar Javier Jardón

Use gdk_event_triggers_context_menu() instead of checking for event->button == 3

parent 45f660ef
......@@ -88,7 +88,8 @@ static gboolean
my_widget_button_press_event_handler (GtkWidget *widget, GdkEventButton *event)
{
/* Ignore double-clicks and triple-clicks */
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
if (gdk_event_triggers_context_menu ((GdkEvent *) event) &&
event->type == GDK_BUTTON_PRESS)
{
do_popup_menu (widget, event);
return TRUE;
......
......@@ -389,7 +389,8 @@ button_press_event_handler (GtkWidget *widget,
GdkEventButton *event)
{
/* Ignore double-clicks and triple-clicks */
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
if (gdk_event_triggers_context_menu ((GdkEvent *) event) &&
event->type == GDK_BUTTON_PRESS)
{
do_popup_menu (widget, event);
return TRUE;
......
......@@ -459,7 +459,7 @@ area_press (GtkWidget *drawing_area,
{
gtk_widget_grab_focus (drawing_area);
if (event->button == 3 &&
if (gdk_event_triggers_context_menu ((GdkEvent *) event) &&
event->type == GDK_BUTTON_PRESS)
{
GtkWidget *menu = gtk_ui_manager_get_widget (merge, "/FileMenu");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment