[gtk+/wip/matthiasc/kill-event-signals: 88/130] 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: 88/130] widget: Stop using ::map-event
- Date: Sat, 6 Jan 2018 23:43:05 +0000 (UTC)
commit c5de2a26377fd0e2f7cb4ad18672c8739e6c130f
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 1a88c02..05e78cd 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3982,13 +3982,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;
}
/**
@@ -4014,7 +4019,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]