diff -r 76aea257b1c6 -r ea49cd76cf47 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sat Sep 09 05:48:09 2017 -0400 +++ b/pidgin/gtkconv.c Sun Sep 10 15:10:34 2017 -0400 @@ -1848,9 +1848,9 @@ goto handled; } - if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { + if (event->button == GDK_BUTTON_PRIMARY && event->type == GDK_2BUTTON_PRESS) { chat_do_im(gtkconv, who); - } else if (event->button == 2 && event->type == GDK_BUTTON_PRESS) { + } else if (event->button == GDK_BUTTON_MIDDLE && event->type == GDK_BUTTON_PRESS) { /* Move to user's anchor */ WebKitDOMNode *node = get_mark_for_user(gtkconv, who); @@ -2286,7 +2286,7 @@ static gboolean entry_stop_rclick_cb(GtkWidget *widget, GdkEventButton *event, gpointer data) { - if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { + if (event->button == GDK_BUTTON_SECONDARY && event->type == GDK_BUTTON_PRESS) { /* Right single click */ g_signal_stop_emission_by_name(G_OBJECT(widget), "button_press_event"); @@ -2959,7 +2959,7 @@ PurpleConversation *conv; PurpleBuddy *buddy; - if (e->button == 1 && e->type == GDK_BUTTON_PRESS) { + if (e->button == GDK_BUTTON_PRIMARY && e->type == GDK_BUTTON_PRESS) { change_size_cb(NULL, gtkconv); return TRUE; } @@ -5880,7 +5880,7 @@ * So if Stu accidentally aims high and middle clicks on the pane-handle, * it causes a conversation tab to close. Let's stop that from happening. */ - if (e->button == 2 && e->type == GDK_BUTTON_PRESS) + if (e->button == GDK_BUTTON_MIDDLE && e->type == GDK_BUTTON_PRESS) return TRUE; return FALSE; } @@ -6243,12 +6243,12 @@ } } - if (btn_event->button == 1 && event->type == GDK_2BUTTON_PRESS) { + if (btn_event->button == GDK_BUTTON_PRIMARY && event->type == GDK_2BUTTON_PRESS) { chat_do_im(PIDGIN_CONVERSATION(conv), buddyname); g_free(name); return TRUE; - } else if (btn_event->button == 2 && event->type == GDK_2BUTTON_PRESS) { + } else if (btn_event->button == GDK_BUTTON_MIDDLE && event->type == GDK_2BUTTON_PRESS) { chat_do_info(PIDGIN_CONVERSATION(conv), buddyname); g_free(name); @@ -9350,7 +9350,7 @@ static gboolean infopane_press_cb(GtkWidget *widget, GdkEventButton *e, PidginConversation *gtkconv) { - if (e->type == GDK_2BUTTON_PRESS && e->button == 1) { + if (e->type == GDK_2BUTTON_PRESS && e->button == GDK_BUTTON_PRIMARY) { if (infopane_entry_activate(gtkconv)) return TRUE; } @@ -9358,7 +9358,7 @@ if (e->type != GDK_BUTTON_PRESS) return FALSE; - if (e->button == 1) { + if (e->button == GDK_BUTTON_PRIMARY) { int nb_x, nb_y; GtkAllocation allocation; @@ -9419,7 +9419,7 @@ GtkWidget *tab; GtkAllocation allocation; - if (e->button == 2 && e->type == GDK_BUTTON_PRESS) { + if (e->button == GDK_BUTTON_MIDDLE && e->type == GDK_BUTTON_PRESS) { PidginConversation *gtkconv; tab_clicked = pidgin_conv_get_tab_at_xy(win, e->x_root, e->y_root, NULL); @@ -9432,7 +9432,7 @@ } - if (e->button != 1 || e->type != GDK_BUTTON_PRESS) + if (e->button != GDK_BUTTON_PRIMARY || e->type != GDK_BUTTON_PRESS) return FALSE; @@ -9515,7 +9515,7 @@ * widget's, because we may be getting an event passed on from the * close button. */ - if (e->button != 1 && e->type != GDK_BUTTON_RELEASE) + if (e->button != GDK_BUTTON_PRIMARY && e->type != GDK_BUTTON_RELEASE) return FALSE; device = gdk_event_get_device((GdkEvent *)e);