2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-29 15:19:53 +00:00

Replace GTK integration with xsettings + XDP

This commit is contained in:
Ilya Fedin
2021-09-03 19:49:48 +04:00
committed by John Preston
parent 434a7c5293
commit 05d4d58f8b
10 changed files with 149 additions and 313 deletions

View File

@@ -9,7 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/crash_reports.h"
#include "core/update_checker.h"
#include "base/platform/linux/base_linux_gtk_integration.h"
#ifndef DESKTOP_APP_DISABLE_WEBKITGTK
#include "webview/platform/linux/webview_linux_webkit2gtk.h"
@@ -63,20 +62,14 @@ int Launcher::exec() {
Glib::init();
Gio::init();
for (auto i = begin(_arguments), e = end(_arguments); i != e; ++i) {
if (*i == "-basegtkintegration" && std::distance(i, e) > 2) {
BaseGtkIntegration::SetServiceName(QString::fromStdString(*(i + 2)));
if (const auto integration = BaseGtkIntegration::Instance()) {
return integration->exec(QString::fromStdString(*(i + 1)));
}
return 1;
#ifndef DESKTOP_APP_DISABLE_WEBKITGTK
} else if (*i == "-webviewhelper" && std::distance(i, e) > 2) {
for (auto i = begin(_arguments), e = end(_arguments); i != e; ++i) {
if (*i == "-webviewhelper" && std::distance(i, e) > 2) {
Webview::WebKit2Gtk::SetServiceName(*(i + 2));
return Webview::WebKit2Gtk::Exec(*(i + 1));
#endif // !DESKTOP_APP_DISABLE_WEBKITGTK
}
}
#endif // !DESKTOP_APP_DISABLE_WEBKITGTK
return Core::Launcher::exec();
}