[gtk/wip/matthiasc/popup: 27/63] popover: Stop using ::set-focus
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup: 27/63] popover: Stop using ::set-focus
- Date: Mon, 4 Mar 2019 04:32:09 +0000 (UTC)
commit a0dc7b473af7f1e64f095576090f49c19b87f441
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 3 08:10:14 2019 -0500
popover: Stop using ::set-focus
This will change completely when GtkPopover becomes a
root. For now, stop using ::set-focus and just use the
focus-widget property.
gtk/gtkpopover.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 6f305ed0aa..7370b4951f 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -614,10 +614,11 @@ window_active_changed (GtkWindow *window,
static void
window_set_focus (GtkWindow *window,
- GtkWidget *widget,
+ GParamSpec *pspec,
GtkPopover *popover)
{
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
+ GtkWidget *widget = gtk_root_get_focus (GTK_ROOT (window));
if (!priv->modal || !widget || !gtk_widget_is_drawable (GTK_WIDGET (popover)))
return;
@@ -673,7 +674,7 @@ gtk_popover_apply_modality (GtkPopover *popover,
g_signal_connect (priv->window, "notify::is-active",
G_CALLBACK (window_active_changed), popover);
- g_signal_connect (priv->window, "set-focus",
+ g_signal_connect (priv->window, "notify::focus-widget",
G_CALLBACK (window_set_focus), popover);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]