"_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",
qt_x11Data->has_fontconfig = FcInit();
#endif
- qt_x11Data->startupId = 0;
-
int argc = priv->argc;
char **argv = priv->argv;
QFont f(QFont::lastResortFamily(), ptsz);
QApplicationPrivate::setSystemFont(f);
}
-
- qt_x11Data->startupId = getenv("DESKTOP_STARTUP_ID");
- if (qt_x11Data->startupId) {
- ::unsetenv("DESKTOP_STARTUP_ID");
- }
}
/*****************************************************************************
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
_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,
static QWidget *keyboardGrabber;
void setWindowRole();
- void sendStartupMessage() const;
void setNetWmWindowTypes();
void x11UpdateIsOpaque();
bool isBackgroundInherited() const;
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()