GTK+2 migrating to GTK+3


I am trying to migrate a project from GTK+2 to GTK+3. Widgets would show correctly in GTK+2. But when I tried to port it to GTK+3 I would see an empty window or now no graphics. Here is some code:

main (int argc, char **argv)
    app = gtk_application_new (an,G_APPLICATION_FLAGS_NONE);
    GApplication *gapp = G_APPLICATION(app);

    g_signal_connect (app, "activate", G_CALLBACK (activate), &margs);

    status = g_application_run (G_APPLICATION (gapp), argc, argv);

    g_object_unref (app);

    return status;


static void
activate (GtkApplication* app, main_args* margs)
[More Code]

    return ;

There’s no reason to cast it here, if you’re also:

Casting it here.

In any case, the “[More code]” bit is likely the culprit, given that the application set up code is correct.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.