[gtk+/wip/matthiasc/kill-event-signals: 45/62] 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: 45/62] widget: Stop using ::map-event
- Date: Tue, 2 Jan 2018 04:55:34 +0000 (UTC)
commit 8e0b10853ffb1c0db9b4ffb678deb68e9dc1337e
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 66b75ea..43f6f68 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3995,13 +3995,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;
}
/**
@@ -4027,7 +4032,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]