From 8afe495a4fdc821b3223e7325228fdd7c928f2b5 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 24 Jun 2021 08:58:10 +0400 Subject: [PATCH] Avoid using g_unix_fd_list_new_from_array --- .../platform/linux/linux_xdp_open_with_dialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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));