cycfi / elements

Elements C++ GUI library
http://cycfi.github.io/elements/
3.15k stars 235 forks source link

GTK complains about command-line arguments #307

Closed Endilll closed 8 months ago

Endilll commented 2 years ago

If you try to launch any of the examples from master branch with additional command-line argument, GTK complains and closes the application:

$ ./examples/empty/EmptyStarter .

(EmptyStarter:29297): GLib-GIO-CRITICAL **: 20:49:57.956: This application can not open files.

(EmptyStarter:29297): GLib-GObject-CRITICAL **: 20:49:57.958: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Passing 1 instead of argc to app constructor works around that, but it doesn't feel too good. I also tried patching elements, replacing G_APPLICATION_FLAGS_NONE with G_APPLICATION_HANDLES_OPEN and G_APPLICATION_HANDLES_COMMAND_LINE, but it appears to be just another can with worms, with GTK complaining about missing handlers.