From ea37e83b1364ab99c2a421c2699a9275415f44a6 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 24 Dec 2023 03:15:27 +0400 Subject: [PATCH] Revert "Force enable fractional-scale-v1 experimental option" This reverts commit 4696f731da3d8a64fbed09a28a2386b7aa10650e. --- Telegram/SourceFiles/core/sandbox.cpp | 24 ------------------- Telegram/SourceFiles/core/sandbox.h | 2 -- .../settings/settings_experimental.cpp | 2 -- Telegram/build/docker/centos_env/Dockerfile | 2 +- 4 files changed, 1 insertion(+), 29 deletions(-) diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp index 0b92376cd6..d432a5d19a 100644 --- a/Telegram/SourceFiles/core/sandbox.cpp +++ b/Telegram/SourceFiles/core/sandbox.cpp @@ -21,7 +21,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "core/local_url_handlers.h" #include "core/update_checker.h" #include "core/deadlock_detector.h" -#include "base/options.h" #include "base/timer.h" #include "base/concurrent_timer.h" #include "base/invoke_queued.h" @@ -38,24 +37,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Core { namespace { -base::options::toggle OptionForceWaylandFractionalScaling({ - .id = kOptionForceWaylandFractionalScaling, - .name = "Enable xdg-output fractional scaling", - .description = "Enable xdg-output based fractional scaling on Wayland. " - "This works without fractional-scale-v1 and without " - "precise High DPI scaling. " - "Requires Qt with Desktop App Toolkit patches.", - .defaultValue = true, - .scope = [] { -#ifdef DESKTOP_APP_QT_PATCHED - return Platform::IsWayland(); -#else // DESKTOP_APP_QT_PATCHED - return false; -#endif // !DESKTOP_APP_QT_PATCHED - }, - .restartRequired = true, -}); - QChar _toHex(ushort v) { v = v & 0x000F; return QChar::fromLatin1((v >= 10) ? ('a' + (v - 10)) : ('0' + v)); @@ -96,17 +77,12 @@ QString _escapeFrom7bit(const QString &str) { } // namespace -const char kOptionForceWaylandFractionalScaling[] = "force-wayland-fractional-scaling"; - bool Sandbox::QuitOnStartRequested = false; Sandbox::Sandbox(int &argc, char **argv) : QApplication(argc, argv) , _mainThreadId(QThread::currentThreadId()) { setQuitOnLastWindowClosed(false); - if (OptionForceWaylandFractionalScaling.value()) { - setProperty("_q_force_wayland_fractional_scale", true); - } } int Sandbox::start() { diff --git a/Telegram/SourceFiles/core/sandbox.h b/Telegram/SourceFiles/core/sandbox.h index 39d16296c7..4c15c2828b 100644 --- a/Telegram/SourceFiles/core/sandbox.h +++ b/Telegram/SourceFiles/core/sandbox.h @@ -19,8 +19,6 @@ class QLockFile; namespace Core { -extern const char kOptionForceWaylandFractionalScaling[]; - class UpdateChecker; class Application; diff --git a/Telegram/SourceFiles/settings/settings_experimental.cpp b/Telegram/SourceFiles/settings/settings_experimental.cpp index 3b9a5a0699..0149872459 100644 --- a/Telegram/SourceFiles/settings/settings_experimental.cpp +++ b/Telegram/SourceFiles/settings/settings_experimental.cpp @@ -17,7 +17,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/chat/chat_style_radius.h" #include "base/options.h" #include "core/application.h" -#include "core/sandbox.h" #include "core/launcher.h" #include "chat_helpers/tabbed_panel.h" #include "dialogs/dialogs_widget.h" @@ -144,7 +143,6 @@ void SetupExperimental( addToggle(ChatHelpers::kOptionTabbedPanelShowOnClick); addToggle(Dialogs::kOptionForumHideChatsList); addToggle(Core::kOptionFractionalScalingEnabled); - addToggle(Core::kOptionForceWaylandFractionalScaling); addToggle(Window::kOptionViewProfileInChatsListContextMenu); addToggle(Info::Profile::kOptionShowPeerIdBelowAbout); addToggle(Ui::GL::kOptionAllowLinuxNvidiaOpenGL); diff --git a/Telegram/build/docker/centos_env/Dockerfile b/Telegram/build/docker/centos_env/Dockerfile index 20d988f2c2..e80722a94d 100644 --- a/Telegram/build/docker/centos_env/Dockerfile +++ b/Telegram/build/docker/centos_env/Dockerfile @@ -54,7 +54,7 @@ FROM builder AS patches RUN git init patches \ && cd patches \ && git remote add origin {{ GIT }}/desktop-app/patches.git \ - && git fetch --depth=1 origin 12780ae73abe21d00ae125e284d8bca9d8993948 \ + && git fetch --depth=1 origin d66c16d044de61fb6ca6c418e7ef3ed4a60f5f7f \ && git reset --hard FETCH_HEAD \ && rm -rf .git