Changeset View
Changeset View
Standalone View
Standalone View
src/platformtheme/x11integration.cpp
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | |||||
111 | } | 111 | } | ||
112 | 112 | | |||
113 | void X11Integration::installDesktopFileName(QWindow *w) | 113 | void X11Integration::installDesktopFileName(QWindow *w) | ||
114 | { | 114 | { | ||
115 | if (!w->isTopLevel()) { | 115 | if (!w->isTopLevel()) { | ||
116 | return; | 116 | return; | ||
117 | } | 117 | } | ||
118 | 118 | | |||
119 | if (QGuiApplication::desktopFileName().isEmpty()) { | 119 | QString desktopFileName = QGuiApplication::desktopFileName(); | ||
120 | if (desktopFileName.isEmpty()) { | ||||
120 | return; | 121 | return; | ||
121 | } | 122 | } | ||
123 | // handle apps which set the desktopFileName property with filename suffix, | ||||
124 | // due to unclear API dox (https://bugreports.qt.io/browse/QTBUG-75521) | ||||
125 | if (desktopFileName.endsWith(QLatin1String(".desktop"))) { | ||||
126 | desktopFileName.chop(8); | ||||
127 | } | ||||
122 | NETWinInfo info(QX11Info::connection(), w->winId(), QX11Info::appRootWindow(), NET::Properties(), NET::Properties2()); | 128 | NETWinInfo info(QX11Info::connection(), w->winId(), QX11Info::appRootWindow(), NET::Properties(), NET::Properties2()); | ||
123 | info.setDesktopFileName(QGuiApplication::desktopFileName().toUtf8().constData()); | 129 | info.setDesktopFileName(desktopFileName.toUtf8().constData()); | ||
124 | } | 130 | } | ||
125 | 131 | | |||
126 | void X11Integration::setWindowProperty(QWindow *window, const QByteArray &name, const QByteArray &value) | 132 | void X11Integration::setWindowProperty(QWindow *window, const QByteArray &name, const QByteArray &value) | ||
127 | { | 133 | { | ||
128 | auto *c = QX11Info::connection(); | 134 | auto *c = QX11Info::connection(); | ||
129 | 135 | | |||
130 | xcb_atom_t atom; | 136 | xcb_atom_t atom; | ||
131 | auto it = m_atoms.find(name); | 137 | auto it = m_atoms.find(name); | ||
Show All 20 Lines |