diff --git a/Telegram/SourceFiles/platform/linux/linux_xdp_open_with_dialog.cpp b/Telegram/SourceFiles/platform/linux/linux_xdp_open_with_dialog.cpp index 810bfeb21d..6b7260a6f3 100644 --- a/Telegram/SourceFiles/platform/linux/linux_xdp_open_with_dialog.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_xdp_open_with_dialog.cpp @@ -17,7 +17,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include -#include #include #include #include @@ -79,7 +78,6 @@ bool XDPOpenWithDialog::exec() { } const auto fdGuard = gsl::finally([&] { ::close(fd); }); - auto outFdList = Glib::RefPtr(); const auto parentWindowId = [&]() -> Glib::ustring { std::stringstream result; @@ -138,6 +136,10 @@ bool XDPOpenWithDialog::exec() { } }); + const auto fdList = Gio::UnixFDList::create(); + fdList->append(fd); + auto outFdList = Glib::RefPtr(); + connection->call_sync( std::string(kXDGDesktopPortalObjectPath), std::string(kXDGDesktopPortalOpenURIInterface), @@ -159,7 +161,7 @@ bool XDPOpenWithDialog::exec() { }, }), }), - Glib::wrap(g_unix_fd_list_new_from_array(&fd, 1)), + fdList, outFdList, std::string(kXDGDesktopPortalService));