[gtk/matthiasc/for-master: 26/29] popovermenu: Pull variable declaration in closest scope




commit aefabcc0560a2116a51edcb6fbc14ad83036a31c
Author: Timm Bäder <mail baedert org>
Date:   Sun Nov 29 08:41:44 2020 +0100

    popovermenu: Pull variable declaration in closest scope

 gtk/gtkpopovermenu.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkpopovermenu.c b/gtk/gtkpopovermenu.c
index d6e5f91887..e0dd9a286c 100644
--- a/gtk/gtkpopovermenu.c
+++ b/gtk/gtkpopovermenu.c
@@ -275,15 +275,15 @@ focus_out (GtkEventController   *controller,
 }
 
 static void
-leave_cb (GtkEventController   *controller,
-          gpointer              data)
+leave_cb (GtkEventController *controller,
+          gpointer            data)
 {
-  GtkWidget *target;
-
-  target = gtk_event_controller_get_widget (controller);
-
   if (!gtk_event_controller_motion_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (controller)))
-    gtk_popover_menu_set_active_item (GTK_POPOVER_MENU (target), NULL);
+    {
+      GtkWidget *target = gtk_event_controller_get_widget (controller);
+
+      gtk_popover_menu_set_active_item (GTK_POPOVER_MENU (target), NULL);
+    }
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]