[Gtk-osx-users] GTK osx apps and iconification
Status: Beta
Brought to you by:
jralls
From: Gabriele G. <gab...@gm...> - 2017-03-09 12:09:23
|
Hi guys, I've found that I have to add to my GTK+2 OSX apps the following code: #ifdef __APPLE__ GtkosxApplication *theApp = (GtkosxApplication *)g_object_new(GTKOSX_TYPE_APPLICATION, NULL); g_signal_connect(theApp, "NSApplicationWillTerminate", G_CALLBACK(g_main_quit), NULL); gtkosx_application_ready(theApp); #endif ... to respond correctly to an un-iconify OSX signal (click on the dock icon) or to the right click on icon "exit signal" Is this necessary or, provided I don't need a menu, there are other crossplatform ways to avoid these problems? -- Bye, Gabry |