Consecutive Invoking of GTK App with Same Input Parameters

When I open the same application twice with identical input parameters, the second instance exits immediately without even triggering the activate method.

However, it is very strange because (second time) the window remains visible but appears incomplete. Here is the sequence of calls I’m using:

const char* pStrDomain = strDomain.c_str();
AdwApplication* app = adw_application_new(pStrDomain, G_APPLICATION_DEFAULT_FLAGS);
if (!app)
{
    return -1;
}
g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);

int status = g_application_run(G_APPLICATION(app), argc, argv);

What could be the reason? I observe the same behavior on both Linux (Ubuntu) and Windows. I’m using Adwaita on both platforms.

OK, I should use G_APPLICATION_NON_UNIQUE instead of
G_APPLICATION_DEFAULT_FLAGS.

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