summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk/gdk-private.h2
-rw-r--r--gdk/gdkevents.c16
-rw-r--r--gdk/gdkeventsprivate.h7
-rw-r--r--gtk/gtkmain.c6
4 files changed, 15 insertions, 16 deletions
diff --git a/gdk/gdk-private.h b/gdk/gdk-private.h
index 9344ac2e49..b5551b750c 100644
--- a/gdk/gdk-private.h
+++ b/gdk/gdk-private.h
@@ -20,8 +20,6 @@ void gdk_surface_thaw_toplevel_updates (GdkSurface *surface);
gboolean gdk_surface_supports_edge_constraints (GdkSurface *surface);
-GObject * gdk_event_get_user_data (const GdkEvent *event);
-
guint32 gdk_display_get_last_seen_time (GdkDisplay *display);
void gdk_display_set_double_click_time (GdkDisplay *display,
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 55b744d4f3..bacc1eb777 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -564,8 +564,8 @@ gdk_event_copy (const GdkEvent *event)
g_object_ref (new_event->any.device);
if (new_event->any.source_device)
g_object_ref (new_event->any.source_device);
- if (new_event->any.user_data)
- g_object_ref (new_event->any.user_data);
+ if (new_event->any.target)
+ g_object_ref (new_event->any.target);
switch ((guint) event->any.type)
{
@@ -675,7 +675,7 @@ gdk_event_finalize (GObject *object)
g_clear_object (&event->any.device);
g_clear_object (&event->any.source_device);
- g_clear_object (&event->any.user_data);
+ g_clear_object (&event->any.target);
G_OBJECT_CLASS (gdk_event_parent_class)->finalize (object);
}
@@ -1904,16 +1904,16 @@ gdk_event_get_scancode (GdkEvent *event)
}
void
-gdk_event_set_user_data (GdkEvent *event,
- GObject *user_data)
+gdk_event_set_target (GdkEvent *event,
+ GObject *target)
{
- g_set_object (&event->any.user_data, user_data);
+ g_set_object (&event->any.target, target);
}
GObject *
-gdk_event_get_user_data (const GdkEvent *event)
+gdk_event_get_target (const GdkEvent *event)
{
- return event->any.user_data;
+ return event->any.target;
}
/**
diff --git a/gdk/gdkeventsprivate.h b/gdk/gdkeventsprivate.h
index 1c6756e60a..f3ccd3d9f7 100644
--- a/gdk/gdkeventsprivate.h
+++ b/gdk/gdkeventsprivate.h
@@ -61,7 +61,7 @@ struct _GdkEventAny
GdkDevice *device;
GdkDevice *source_device;
GdkDisplay *display;
- GObject *user_data;
+ GObject *target;
};
/*
@@ -636,8 +636,9 @@ union _GdkEvent
GdkEventPadGroupMode pad_group_mode;
};
-void gdk_event_set_user_data (GdkEvent *event,
- GObject *user_data);
+void gdk_event_set_target (GdkEvent *event,
+ GObject *user_data);
+GObject * gdk_event_get_target (const GdkEvent *event);
#endif /* __GDK_EVENTS_PRIVATE_H__ */
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index be19d7389c..9cc8c22e7d 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1416,7 +1416,7 @@ synth_crossing (GtkWidget *widget,
gdouble x, y;
event = gdk_event_new (enter ? GDK_ENTER_NOTIFY : GDK_LEAVE_NOTIFY);
- gdk_event_set_user_data (event, G_OBJECT (widget));
+ gdk_event_set_target (event, G_OBJECT (widget));
gdk_event_set_device (event, gdk_event_get_device (source));
gdk_event_set_source_device (event, gdk_event_get_source_device (source));
@@ -1779,7 +1779,7 @@ gtk_main_do_event (GdkEvent *event)
if (!target_widget)
goto cleanup;
- gdk_event_set_user_data (event, G_OBJECT (target_widget));
+ gdk_event_set_target (event, G_OBJECT (target_widget));
window_group = gtk_main_get_window_group (target_widget);
device = gdk_event_get_device (event);
@@ -2398,7 +2398,7 @@ gtk_get_event_widget (const GdkEvent *event)
GtkWidget *
gtk_get_event_target (const GdkEvent *event)
{
- return GTK_WIDGET (gdk_event_get_user_data (event));
+ return GTK_WIDGET (gdk_event_get_target (event));
}
/**