From a503197352c4a5f08899a4b53e34085b513bab65 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 14 Apr 2024 02:25:39 +0400 Subject: [PATCH] Remove XCBSetDesktopFileName This is done by Qt nowadays --- .../platform/linux/main_window_linux.cpp | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index e6a3b68a6..c8218ca7d 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -99,42 +99,6 @@ void XCBSkipTaskbar(QWindow *window, bool skip) { | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, reinterpret_cast(&xev)); } - -void XCBSetDesktopFileName(QWindow *window) { - const auto connection = base::Platform::XCB::GetConnectionFromQt(); - if (!connection) { - return; - } - - const auto utf8Atom = base::Platform::XCB::GetAtom( - connection, - "UTF8_STRING"); - - if (!utf8Atom.has_value()) { - return; - } - - const auto filenameAtoms = { - base::Platform::XCB::GetAtom(connection, "_GTK_APPLICATION_ID"), - base::Platform::XCB::GetAtom(connection, "_KDE_NET_WM_DESKTOP_FILE"), - }; - - const auto filename = QGuiApplication::desktopFileName().toUtf8(); - - for (const auto atom : filenameAtoms) { - if (atom.has_value()) { - xcb_change_property( - connection, - XCB_PROP_MODE_REPLACE, - window->winId(), - *atom, - *utf8Atom, - 8, - filename.size(), - filename.data()); - } - } -} #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION void SkipTaskbar(QWindow *window, bool skip) { @@ -206,10 +170,6 @@ void MainWindow::initHook() { } return base::EventFilterResult::Continue; }); - -#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION - XCBSetDesktopFileName(windowHandle()); -#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION } void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) {