[gtk+/wip/carlosg/private-event-structs] text handle: Use GdkEvent API
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/private-event-structs] text handle: Use GdkEvent API
- Date: Sat, 26 Aug 2017 16:23:45 +0000 (UTC)
commit db1f5ca2471115b1a02a3045cddc4fbfb0418dd8
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 26 12:22:35 2017 -0400
text handle: Use GdkEvent API
gtk/gtktexthandle.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c
index 1eeddd5..ff16630 100644
--- a/gtk/gtktexthandle.c
+++ b/gtk/gtktexthandle.c
@@ -191,6 +191,7 @@ gtk_text_handle_widget_event (GtkWidget *widget,
gdouble event_x, event_y;
guint state;
gint pos;
+ GdkCrossingMode mode;
priv = handle->priv;
pos = _text_handle_pos_from_widget (handle, widget);
@@ -200,6 +201,7 @@ gtk_text_handle_widget_event (GtkWidget *widget,
event_type = gdk_event_get_event_type (event);
gdk_event_get_coords (event, &event_x, &event_y);
+ gdk_event_get_crossing_mode (event, &mode);
if (event_type == GDK_BUTTON_PRESS)
{
@@ -220,8 +222,8 @@ gtk_text_handle_widget_event (GtkWidget *widget,
else if (event_type == GDK_LEAVE_NOTIFY)
{
if (!priv->windows[pos].dragged &&
- (event->crossing.mode == GDK_CROSSING_NORMAL ||
- event->crossing.mode == GDK_CROSSING_UNGRAB))
+ (mode == GDK_CROSSING_NORMAL ||
+ mode == GDK_CROSSING_UNGRAB))
gtk_text_handle_unset_state (handle, pos, GTK_STATE_FLAG_PRELIGHT);
}
else if (event_type == GDK_MOTION_NOTIFY &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]