[gtk/readonly-events-1: 21/35] main: Stop calling gdk_event_set_target
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/readonly-events-1: 21/35] main: Stop calling gdk_event_set_target
- Date: Tue, 18 Feb 2020 05:24:19 +0000 (UTC)
commit fba1f2b725d0b3b9f2ffdf4a24845ecdafd04f8e
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 16 02:50:09 2020 -0500
main: Stop calling gdk_event_set_target
GTK is no longer relying on this.
gdk/gdkevents.c | 42 ------------------------------------------
gtk/gtkmain.c | 2 --
2 files changed, 44 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index b5cd263714..9b867d00dc 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -415,11 +415,6 @@ gdk_event_free (GdkEvent *event)
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
g_clear_object (&event->crossing.child_surface);
- g_clear_object (&event->crossing.related_target);
- break;
-
- case GDK_FOCUS_CHANGE:
- g_clear_object (&event->focus_change.related_target);
break;
case GDK_DRAG_ENTER:
@@ -470,7 +465,6 @@ gdk_event_free (GdkEvent *event)
g_clear_object (&event->any.device);
g_clear_object (&event->any.source_device);
- g_clear_object (&event->any.target);
g_free (event);
}
@@ -1643,42 +1637,6 @@ gdk_event_get_scancode (GdkEvent *event)
return 0;
}
-void
-gdk_event_set_target (GdkEvent *event,
- GObject *target)
-{
- g_set_object (&event->any.target, target);
-}
-
-GObject *
-gdk_event_get_target (const GdkEvent *event)
-{
- return event->any.target;
-}
-
-void
-gdk_event_set_related_target (GdkEvent *event,
- GObject *target)
-{
- if (event->any.type == GDK_ENTER_NOTIFY ||
- event->any.type == GDK_LEAVE_NOTIFY)
- g_set_object (&event->crossing.related_target, target);
- else if (event->any.type == GDK_FOCUS_CHANGE)
- g_set_object (&event->focus_change.related_target, target);
-}
-
-GObject *
-gdk_event_get_related_target (const GdkEvent *event)
-{
- if (event->any.type == GDK_ENTER_NOTIFY ||
- event->any.type == GDK_LEAVE_NOTIFY)
- return event->crossing.related_target;
- else if (event->any.type == GDK_FOCUS_CHANGE)
- return event->focus_change.related_target;
-
- return NULL;
-}
-
/**
* gdk_event_is_sent:
* @event: a #GdkEvent
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 6e2d4b4994..3931a2ea56 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1651,8 +1651,6 @@ gtk_main_do_event (GdkEvent *event)
if (!target_widget)
goto cleanup;
- gdk_event_set_target (event, G_OBJECT (target_widget));
-
window_group = gtk_main_get_window_group (target_widget);
device = gdk_event_get_device (event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]