[gnome-applets/wip/segeiger/window-picker/task-title: 3/5] windowpicker: limit button press event to first mouse button
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/segeiger/window-picker/task-title: 3/5] windowpicker: limit button press event to first mouse button
- Date: Wed, 10 Feb 2016 09:45:34 +0000 (UTC)
commit 08008caf7d16e0995489da8a4ffda8c114a6a025
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 a5ee929..773dc59 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]