drop startup notification support

essentially non-operational for Katana applications (KApplication has a
hack to steal the DESKTOP_STARTUP_ID environment variable) and it is by
no means Katie's responsibility to do startup notification

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-19 00:16:29 +03:00
parent 9c5f99c4ca
commit 198625f679
4 changed files with 0 additions and 56 deletions

View file

@ -160,9 +160,6 @@ static const char* X11AtomsTbl[QX11Data::NPredefinedAtoms] = {
"_NET_WM_WINDOW_TYPE_DND\0",
"_NET_WM_WINDOW_TYPE_NORMAL\0",
"_NET_STARTUP_INFO\0",
"_NET_STARTUP_INFO_BEGIN\0",
"_NET_SUPPORTING_WM_CHECK\0",
"_NET_SYSTEM_TRAY_VISUAL\0",
@ -935,8 +932,6 @@ void qt_init(QApplicationPrivate *priv, Display *display,
qt_x11Data->has_fontconfig = FcInit();
#endif
qt_x11Data->startupId = 0;
int argc = priv->argc;
char **argv = priv->argv;
@ -1226,11 +1221,6 @@ void qt_init(QApplicationPrivate *priv, Display *display,
QFont f(QFont::lastResortFamily(), ptsz);
QApplicationPrivate::setSystemFont(f);
}
qt_x11Data->startupId = getenv("DESKTOP_STARTUP_ID");
if (qt_x11Data->startupId) {
::unsetenv("DESKTOP_STARTUP_ID");
}
}
/*****************************************************************************

View file

@ -244,8 +244,6 @@ public:
bool has_fontconfig;
int fc_hint_style;
char *startupId;
/* Warning: if you modify this list, modify the names of atoms in qapplication_x11.cpp as well! */
enum X11Atom {
// window-manager <-> client protocols
@ -329,9 +327,6 @@ public:
_NET_WM_WINDOW_TYPE_DND,
_NET_WM_WINDOW_TYPE_NORMAL,
_NET_STARTUP_INFO,
_NET_STARTUP_INFO_BEGIN,
_NET_SUPPORTING_WM_CHECK,
_NET_SYSTEM_TRAY_VISUAL,

View file

@ -558,7 +558,6 @@ public:
static QWidget *keyboardGrabber;
void setWindowRole();
void sendStartupMessage() const;
void setNetWmWindowTypes();
void x11UpdateIsOpaque();
bool isBackgroundInherited() const;

View file

@ -1948,46 +1948,6 @@ void QWidgetPrivate::show_sys()
if (q->internalWinId())
XMapWindow(qt_x11Data->display, q->internalWinId());
// Freedesktop.org Startup Notification
if (qt_x11Data->startupId && q->isWindow()) {
sendStartupMessage();
}
}
/*!
\internal
Platform-specific part of QWidget::show().
*/
void QWidgetPrivate::sendStartupMessage() const
{
Q_Q(const QWidget);
QByteArray message("remove: ID=");
message.append(qt_x11Data->startupId);
XEvent xevent;
xevent.xclient.type = ClientMessage;
xevent.xclient.message_type = ATOM(_NET_STARTUP_INFO_BEGIN);
xevent.xclient.display = qt_x11Data->display;
xevent.xclient.window = q->internalWinId();
xevent.xclient.format = 8;
Window rootWindow = RootWindow(qt_x11Data->display, DefaultScreen(qt_x11Data->display));
uint sent = 0;
uint length = message.size() + 1;
do {
if (sent == 20)
xevent.xclient.message_type = ATOM(_NET_STARTUP_INFO);
for (uint i = 0; i < 20 && i + sent <= length; i++)
xevent.xclient.data.b[i] = message[i + sent++];
XSendEvent(qt_x11Data->display, rootWindow, false, PropertyChangeMask, &xevent);
} while (sent <= length);
qt_x11Data->startupId = 0;
}
void QWidgetPrivate::setNetWmWindowTypes()