tests: Avoid a use of ::map-event

We can use the ::map signal here instead.
This commit is contained in:
Matthias Clasen 2017-12-31 14:19:34 -05:00
parent 1e8a336993
commit 3cb93a479a
2 changed files with 5 additions and 8 deletions

View File

@ -147,8 +147,7 @@ tick_callback (GtkWidget *widget,
}
static gboolean
on_map_event (GtkWidget *widget,
GdkEventAny *event)
on_map (GtkWidget *widget)
{
gtk_widget_add_tick_callback (window, tick_callback, NULL, NULL);
@ -200,8 +199,8 @@ main(int argc, char **argv)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_main_quit), NULL);
g_signal_connect (window, "map-event",
G_CALLBACK (on_map_event), NULL);
g_signal_connect (window, "map",
G_CALLBACK (on_map), NULL);
on_frame (0.);
display = gtk_widget_get_display (window);

View File

@ -29,9 +29,7 @@ place_popup (GtkWidget *parent,
}
static gboolean
on_map_event (GtkWidget *parent,
GdkEvent *event,
gpointer data)
on_map (GtkWidget *parent)
{
GtkWidget *popup, *da;
@ -59,7 +57,7 @@ main (int argc, char *argv[])
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "destroy", gtk_main_quit, NULL);
g_signal_connect (window, "map-event", G_CALLBACK (on_map_event), NULL);
g_signal_connect (window, "map", G_CALLBACK (on_map), NULL);
gtk_widget_show (window);