[gtk+] popover: Emit ::closed once modality is cleared



commit d74ca9f02c3632e678f31ccfea767215afa3c726
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Feb 6 16:13:43 2014 +0100

    popover: Emit ::closed once modality is cleared
    
    Otherwise, calling gtk_widget_grab_focus() on a widget when the
    popover send ::closed won't work.

 gtk/gtkpopover.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 76b31d1..ced74dc 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -295,13 +295,13 @@ gtk_popover_unmap (GtkWidget *widget)
   priv = GTK_POPOVER (widget)->priv;
   priv->button_pressed = FALSE;
 
-  g_signal_emit (widget, signals[CLOSED], 0);
-
   if (priv->modal)
     gtk_popover_apply_modality (GTK_POPOVER (widget), FALSE);
 
   gdk_window_hide (gtk_widget_get_window (widget));
   GTK_WIDGET_CLASS (gtk_popover_parent_class)->unmap (widget);
+
+  g_signal_emit (widget, signals[CLOSED], 0);
 }
 
 static void


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