[gtk+/wip/matthiasc/kill-event-signals: 56/81] widget: Stop using ::map-event
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/kill-event-signals: 56/81] widget: Stop using ::map-event
- Date: Wed, 3 Jan 2018 02:53:02 +0000 (UTC)
commit 68191f4c299337b4f243e34da9d4d8f1dd551781
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jan 1 16:57:55 2018 -0500
widget: Stop using ::map-event
Use ::event here, since we want to drop the event-specific
signals.
gtk/gtkwidget.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 5dbb4f1..e74159e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3994,13 +3994,18 @@ gtk_widget_real_show (GtkWidget *widget)
}
}
-static void
+static gboolean
gtk_widget_show_map_callback (GtkWidget *widget, GdkEvent *event, gint *flag)
{
- *flag = TRUE;
- g_signal_handlers_disconnect_by_func (widget,
- gtk_widget_show_map_callback,
- flag);
+ if (gdk_event_get_event_type (event) == GDK_MAP)
+ {
+ *flag = TRUE;
+ g_signal_handlers_disconnect_by_func (widget,
+ gtk_widget_show_map_callback,
+ flag);
+ }
+
+ return FALSE;
}
/**
@@ -4026,7 +4031,7 @@ gtk_widget_show_now (GtkWidget *widget)
{
gtk_widget_show (widget);
- g_signal_connect (widget, "map-event",
+ g_signal_connect (widget, "event",
G_CALLBACK (gtk_widget_show_map_callback),
&flag);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]