mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-02 10:18:30 +00:00
Merge tag 'v5.3.2' into dev
# Conflicts: # .github/workflows/mac_packaged.yml # Telegram/Resources/winrc/Telegram.rc # Telegram/Resources/winrc/Updater.rc # Telegram/SourceFiles/boxes/sticker_set_box.cpp # Telegram/SourceFiles/core/version.h # Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp # Telegram/lib_ui # snap/snapcraft.yaml
This commit is contained in:
@@ -18,8 +18,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "storage/localstorage.h"
|
||||
#include "core/launcher.h"
|
||||
#include "core/sandbox.h"
|
||||
#include "core/application.h"
|
||||
#include "core/core_settings.h"
|
||||
#include "core/update_checker.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "webview/platform/linux/webview_linux_webkitgtk.h"
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
@@ -92,10 +94,24 @@ void PortalAutostart(bool enabled, Fn<void(bool)> done) {
|
||||
uniqueName.erase(0, 1);
|
||||
uniqueName.replace(uniqueName.find('.'), 1, 1, '_');
|
||||
|
||||
const auto window = std::make_shared<QWidget>();
|
||||
window->setAttribute(Qt::WA_DontShowOnScreen);
|
||||
window->setWindowModality(Qt::ApplicationModal);
|
||||
window->show();
|
||||
const auto parent = []() -> QPointer<QWidget> {
|
||||
const auto active = Core::App().activeWindow();
|
||||
if (!active) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return active->widget().get();
|
||||
}();
|
||||
|
||||
const auto window = std::make_shared<base::unique_qptr<QWidget>>(
|
||||
std::in_place,
|
||||
parent);
|
||||
|
||||
auto &raw = **window;
|
||||
raw.setAttribute(Qt::WA_DontShowOnScreen);
|
||||
raw.setWindowFlag(Qt::Window);
|
||||
raw.setWindowModality(Qt::WindowModal);
|
||||
raw.show();
|
||||
|
||||
XdpRequest::RequestProxy::new_(
|
||||
proxy->get_connection(),
|
||||
@@ -146,7 +162,6 @@ void PortalAutostart(bool enabled, Fn<void(bool)> done) {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
std::vector<std::string> commandline;
|
||||
commandline.push_back(executable.toStdString());
|
||||
if (Core::Launcher::Instance().customWorkingDir()) {
|
||||
@@ -156,7 +171,9 @@ void PortalAutostart(bool enabled, Fn<void(bool)> done) {
|
||||
commandline.push_back("-autostart");
|
||||
|
||||
interface.call_request_background(
|
||||
base::Platform::XDP::ParentWindowID(),
|
||||
base::Platform::XDP::ParentWindowID(parent
|
||||
? parent->windowHandle()
|
||||
: nullptr),
|
||||
GLib::Variant::new_array({
|
||||
GLib::Variant::new_dict_entry(
|
||||
GLib::Variant::new_string("handle_token"),
|
||||
|
||||
Reference in New Issue
Block a user