- g_dbus_connection_call (impl->session_bus,
- impl->bus_name,
- impl->object_path,
- "org.gtk.Application",
- "CommandLine",
- g_variant_new ("(o^aay@a{sv})", object_path,
- arguments, platform_data),
+#ifdef G_OS_UNIX
+ {
+ GError *error = NULL;
+ GUnixFDList *fd_list;
+
+ /* send along the stdin in case
+ * g_application_command_line_get_stdin_data() is called
+ */
+ fd_list = g_unix_fd_list_new ();
+ g_unix_fd_list_append (fd_list, 0, &error);
+ g_assert_no_error (error);
+
+ g_dbus_connection_call_with_unix_fd_list (impl->session_bus, impl->bus_name, impl->object_path,
+ "org.gtk.Application", "CommandLine",
+ g_variant_new ("(o^aay@a{sv})", object_path, arguments, platform_data),
+ G_VARIANT_TYPE ("(i)"), 0, G_MAXINT, fd_list, NULL,
+ g_application_impl_cmdline_done, &data);
+ g_object_unref (fd_list);
+ }
+#else
+ g_dbus_connection_call (impl->session_bus, impl->bus_name, impl->object_path,
+ "org.gtk.Application", "CommandLine",
+ g_variant_new ("(o^aay@a{sv})", object_path, arguments, platform_data),