Remove XCBSetDesktopFileName

This is done by Qt nowadays
This commit is contained in:
Ilya Fedin 2024-04-14 02:25:39 +04:00 committed by John Preston
parent d9d9a8f49d
commit a503197352
1 changed files with 0 additions and 40 deletions

View File

@ -99,42 +99,6 @@ void XCBSkipTaskbar(QWindow *window, bool skip) {
| XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY,
reinterpret_cast<const char*>(&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) {