gtkmain: Drop redundant code
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 18 Sep 2023 14:55:54 +0000 (16:55 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 19 Sep 2023 20:32:27 +0000 (16:32 -0400)
The common ancestor is already figured out at the beginning of the
function, no need to find it again.

gtk/gtkmain.c

index 040fdaefb5c19f002f0862eaef174611b85a92c5..b0a5d2fbc0dd05fd525e44b6a75731f77d024967 100644 (file)
@@ -1191,11 +1191,6 @@ gtk_synthesize_crossing_events (GtkRoot         *toplevel,
   for (widget = new_target; widget; widget = _gtk_widget_get_parent (widget))
     gtk_widget_stack_append (&target_array, g_object_ref (widget));
 
-  if (old_target && new_target)
-    ancestor = gtk_widget_common_ancestor (old_target, new_target);
-  else
-    ancestor = NULL;
-
   crossing.direction = GTK_CROSSING_IN;
 
   seen_ancestor = FALSE;