[gtk+/touchscreens: 22/67] scrolledwindow: Add GdkDevice parameter to ::press-and-hold handler
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/touchscreens: 22/67] scrolledwindow: Add GdkDevice parameter to ::press-and-hold handler
- Date: Thu, 29 Dec 2011 00:38:53 +0000 (UTC)
commit fa78816b645d308b51d413b8ee179ea6081c0206
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Nov 1 12:42:15 2011 +0100
scrolledwindow: Add GdkDevice parameter to ::press-and-hold handler
gtk/gtkscrolledwindow.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index be58926..67b41a6 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -233,6 +233,7 @@ static gboolean gtk_scrolled_window_scroll_event (GtkWidget *widge
static gboolean gtk_scrolled_window_button_press_event (GtkWidget *widget,
GdkEvent *event);
static gboolean gtk_scrolled_window_press_and_hold (GtkWidget *widget,
+ GdkDevice *device,
GtkPressAndHoldAction action,
gint x,
gint y);
@@ -2820,6 +2821,7 @@ gtk_scrolled_window_start_deceleration (GtkScrolledWindow *scrolled_window,
static gboolean
gtk_scrolled_window_press_and_hold (GtkWidget *widget,
+ GdkDevice *device,
GtkPressAndHoldAction action,
gint x,
gint y)
@@ -2835,8 +2837,11 @@ gtk_scrolled_window_press_and_hold (GtkWidget *widget,
/* Cancel the scrolling and send the button press
* event to the child widget
*/
+ if (!priv->button_press_event ||
+ device != gdk_event_get_device (priv->button_press_event))
+ return FALSE;
- gdk_device_ungrab (gdk_event_get_device (priv->button_press_event), GDK_CURRENT_TIME);
+ gdk_device_ungrab (device, GDK_CURRENT_TIME);
if (priv->motion_notify_id > 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]