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 a425ff59f..9d2cf048e 100644 --- a/Telegram/SourceFiles/platform/linux/linux_xdp_open_with_dialog.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_xdp_open_with_dialog.cpp @@ -9,7 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/platform/base_platform_info.h" #include "base/platform/linux/base_linux_xdp_utilities.h" -#include "base/platform/linux/base_linux_wayland_integration.h" +#include "base/platform/linux/base_linux_xdg_activation_token.h" #include "base/random.h" #include @@ -23,6 +23,7 @@ namespace { constexpr auto kXDPOpenURIInterface = "org.freedesktop.portal.OpenURI"; constexpr auto kPropertiesInterface = "org.freedesktop.DBus.Properties"; +const auto XdgActivationToken = base::Platform::XdgActivationToken; } // namespace @@ -61,14 +62,6 @@ bool ShowXDPOpenWithDialog(const QString &filepath) { const auto handleToken = Glib::ustring("tdesktop") + std::to_string(base::RandomValue()); - const auto activationToken = []() -> Glib::ustring { - using base::Platform::WaylandIntegration; - if (const auto integration = WaylandIntegration::Instance()) { - return integration->activationToken().toStdString(); - } - return {}; - }(); - auto uniqueName = connection->get_unique_name(); uniqueName.erase(0, 1); uniqueName.replace(uniqueName.find('.'), 1, 1, '_'); @@ -118,7 +111,8 @@ bool ShowXDPOpenWithDialog(const QString &filepath) { }, { "activation_token", - Glib::create_variant(activationToken) + Glib::create_variant( + Glib::ustring(XdgActivationToken().toStdString())) }, { "ask", diff --git a/Telegram/lib_base b/Telegram/lib_base index c36d961ea..a7c44bbf5 160000 --- a/Telegram/lib_base +++ b/Telegram/lib_base @@ -1 +1 @@ -Subproject commit c36d961eaf3d3a09d100509196aa039958f264bc +Subproject commit a7c44bbf531b5e547c92b6fcdd48ca6cdd18b9d2