[gnome-applets/gnome-3-18] windowpicker: limit button press event to first mouse button



commit bd9df70568d25a1ffbd701a2606afa6c74bca47b
Author: Sebastian Geiger <sbastig gmx net>
Date:   Wed Feb 10 10:44:32 2016 +0100

    windowpicker: limit button press event to first mouse button

 windowpicker/src/wp-task-title.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/windowpicker/src/wp-task-title.c b/windowpicker/src/wp-task-title.c
index 48b3ede..8ea1afa 100644
--- a/windowpicker/src/wp-task-title.c
+++ b/windowpicker/src/wp-task-title.c
@@ -87,13 +87,16 @@ logout_ready_callback (GObject      *source_object,
 }
 
 static gboolean
-button_press_event_cb (GtkButton *button,
-                       GdkEvent  *event,
-                       gpointer   user_data)
+button_press_event_cb (GtkButton      *button,
+                       GdkEventButton *event,
+                       gpointer        user_data)
 {
   WpTaskTitle *title;
   const gchar *icon;
 
+  if (event->button != 1)
+    return GDK_EVENT_STOP;
+
   title = WP_TASK_TITLE (user_data);
 
   gtk_image_get_icon_name (GTK_IMAGE (title->image), &icon, NULL);
@@ -130,7 +133,7 @@ button_press_event_cb (GtkButton *button,
       g_assert_not_reached ();
     }
 
-  return FALSE;
+  return GDK_EVENT_PROPAGATE;
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]