[gtk+/wip/carlosg/private-event-structs: 24/41] paned: Update to using GdkEvent API
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/private-event-structs: 24/41] paned: Update to using GdkEvent API
- Date: Fri, 25 Aug 2017 15:07:16 +0000 (UTC)
commit 11be5945fdf6e125f760a23241727f8418d5e109
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Aug 25 16:51:12 2017 +0200
paned: Update to using GdkEvent API
gtk/gtkpaned.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 6bbc58b..da21bc1 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -312,12 +312,14 @@ gtk_paned_motion_notify (GtkWidget *widget,
GtkPanedPrivate *priv = gtk_paned_get_instance_private (paned);
GdkRectangle handle_area;
GdkDisplay *display;
+ gdouble x, y;
get_handle_area (paned, &handle_area);
display = gtk_widget_get_display (widget);
- if (gdk_rectangle_contains_point (&handle_area, event->x, event->y) ||
- priv->panning)
+ if (gdk_event_get_coords ((GdkEvent *) event, &x, &y) &&
+ (gdk_rectangle_contains_point (&handle_area, x, y) ||
+ priv->panning))
{
GdkCursor *cursor;
@@ -765,7 +767,7 @@ gesture_drag_begin_cb (GtkGestureDrag *gesture,
device = gdk_event_get_source_device (event);
priv->panning = FALSE;
- is_touch = (event->type == GDK_TOUCH_BEGIN ||
+ is_touch = (gdk_event_get_event_type (event) == GDK_TOUCH_BEGIN ||
gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN);
get_handle_area (paned, &handle_area);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]