Merge branch 'quartz-openfile-fix' into 'master'

quartz: gtk-application - inhibit openFiles events from cmdline

See merge request GNOME/gtk!2112
This commit is contained in:
Matthias Clasen 2020-06-18 21:43:59 +00:00
commit 77b4f6d68e

View File

@ -325,6 +325,13 @@ gtk_application_impl_quartz_uninhibit (GtkApplicationImpl *impl,
static void
gtk_application_impl_quartz_init (GtkApplicationImplQuartz *quartz)
{
/* This is required so that Cocoa is not going to parse the
command line arguments by itself and generate OpenFile events.
We already parse the command line ourselves, so this is needed
to prevent opening files twice, etc. */
[[NSUserDefaults standardUserDefaults] setObject:@"NO"
forKey:@"NSTreatUnknownArgumentsAsOpen"];
quartz->combined = g_menu_new ();
}