mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Remove XCBSetDesktopFileName
This is done by Qt nowadays
This commit is contained in:
parent
d9d9a8f49d
commit
a503197352
1 changed files with 0 additions and 40 deletions
|
@ -99,42 +99,6 @@ void XCBSkipTaskbar(QWindow *window, bool skip) {
|
||||||
| XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY,
|
| XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY,
|
||||||
reinterpret_cast<const char*>(&xev));
|
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
|
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||||
|
|
||||||
void SkipTaskbar(QWindow *window, bool skip) {
|
void SkipTaskbar(QWindow *window, bool skip) {
|
||||||
|
@ -206,10 +170,6 @@ void MainWindow::initHook() {
|
||||||
}
|
}
|
||||||
return base::EventFilterResult::Continue;
|
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) {
|
void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue