KWindowSystem
kstartupinfo.cpp
133 QMap<KStartupInfoId, Data>::iterator removeStartupInfoInternal(QMap<KStartupInfoId, Data>::iterator it);
138 bool find_pid(pid_t pid_P, const QByteArray &hostname, KStartupInfoId *id_O, KStartupInfoData *data_O);
139 bool find_wclass(const QByteArray &res_name_P, const QByteArray &res_class_P, KStartupInfoId *id_O, KStartupInfoData *data_O);
142 static QString check_required_startup_fields(const QString &msg, const KStartupInfoData &data, int screen);
173 QObject::connect(KX11Extras::self(), SIGNAL(windowAdded(WId)), q, SLOT(slot_window_added(WId)));
273void KStartupInfo::Private::new_startup_info_internal(const KStartupInfoId &id_P, KStartupInfo::Data &data_P, bool update_P)
367QMap<KStartupInfoId, KStartupInfo::Data>::iterator KStartupInfo::Private::removeStartupInfoInternal(QMap<KStartupInfoId, Data>::iterator it)
376 for (QMap<KStartupInfoId, KStartupInfo::Data>::Iterator it = startups.begin(); it != startups.end(); ++it) {
388void KStartupInfo::Private::remove_startup_pids(const KStartupInfoId &id_P, const KStartupInfoData &data_P)
420bool KStartupInfo::sendStartupXcb(xcb_connection_t *conn, int screen, const KStartupInfoId &id_P, const KStartupInfoData &data_P)
433QString KStartupInfo::Private::check_required_startup_fields(const QString &msg, const KStartupInfoData &data_P, int screen)
458bool KStartupInfo::sendChangeXcb(xcb_connection_t *conn, int screen, const KStartupInfoId &id_P, const KStartupInfoData &data_P)
497bool KStartupInfo::sendFinishXcb(xcb_connection_t *conn, int screen, const KStartupInfoId &id_P, const KStartupInfoData &data_P)
517 setStartupId("0"); // reset the id, no longer valid (must use clearStartupId() to avoid infinite loop)
546 if (QX11Info::appUserTime() == 0 || NET::timestampCompare(timestamp, QX11Info::appUserTime()) > 0) { // time > appUserTime
549 if (QX11Info::appTime() == 0 || NET::timestampCompare(timestamp, QX11Info::appTime()) > 0) { // time > appTime
581KStartupInfo::startup_t KStartupInfo::checkStartup(WId w_P, KStartupInfoId &id_O, KStartupInfoData &data_O)
601KStartupInfo::startup_t KStartupInfo::Private::check_startup_internal(WId w_P, KStartupInfoId *id_O, KStartupInfoData *data_O)
643 NET::WindowType type = info.windowType(NET::NormalMask | NET::DesktopMask | NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask
645 if (type != NET::Normal && type != NET::Override && type != NET::Unknown && type != NET::Dialog && type != NET::Utility)
659bool KStartupInfo::Private::find_id(const QByteArray &id_P, KStartupInfoId *id_O, KStartupInfoData *data_O)
677bool KStartupInfo::Private::find_pid(pid_t pid_P, const QByteArray &hostname_P, KStartupInfoId *id_O, KStartupInfoData *data_O)
680 for (QMap<KStartupInfoId, KStartupInfo::Data>::Iterator it = startups.begin(); it != startups.end(); ++it) {
698bool KStartupInfo::Private::find_wclass(const QByteArray &_res_name, const QByteArray &_res_class, KStartupInfoId *id_O, KStartupInfoData *data_O)
727 NETWinInfo info(QX11Info::connection(), w_P, QX11Info::appRootWindow(), NET::Properties(), NET::WM2StartupId | NET::WM2GroupLeader);
731 NETWinInfo groupLeaderInfo(QX11Info::connection(), info.groupLeader(), QX11Info::appRootWindow(), NET::Properties(), NET::Properties2());
745 NETWinInfo info(QX11Info::connection(), w_P, QX11Info::appRootWindow(), NET::Properties(), NET::Properties2());
804 for (QMap<KStartupInfoId, KStartupInfo::Data>::Iterator it = startups.begin(); it != startups.end();) {
833 QByteArray id = QStringLiteral("%1;%2;%3;%4_TIME%5").arg(hostname).arg(tm.tv_sec).arg(tm.tv_usec).arg(getpid()).arg(timestamp).toUtf8();
978 ret += QStringLiteral(" DESKTOP=%1").arg(desktop == NET::OnAllDesktops ? NET::OnAllDesktops : desktop - 1); // spec counts from 0
1077 for (QList<pid_t>::ConstIterator it = data_P.d->pids.constBegin(); it != data_P.d->pids.constEnd(); ++it) {
Class representing data about an application startup notification.
Definition kstartupinfo.h:406
const QString & findDescription() const
Returns the description of the startup notification.
Definition kstartupinfo.cpp:1142
const QString & description() const
Returns the name of the startup notification, or empty if not available.
Definition kstartupinfo.cpp:1137
QByteArray WMClass() const
Returns the WM_CLASS value for the startup notification, or empty if not available.
Definition kstartupinfo.cpp:1191
void update(const KStartupInfoData &data)
Updates the notification data from the given data.
Definition kstartupinfo.cpp:1054
void setHostname(const QByteArray &hostname=QByteArray())
Sets the hostname on which the application is starting.
Definition kstartupinfo.cpp:1196
TriState silent() const
Return the silence status for the startup notification.
Definition kstartupinfo.cpp:1242
void setDesktop(int desktop)
Sets the desktop for the startup notification (i.e. the desktop on which the starting application sho...
Definition kstartupinfo.cpp:1168
QString applicationId() const
The .desktop file used to initiate this startup notification, or empty.
Definition kstartupinfo.cpp:1281
const QString & findIcon() const
Returns the icon of the startup notification, and if it's not available, tries to get it from the bin...
Definition kstartupinfo.cpp:1155
QList< pid_t > pids() const
Returns all PIDs for the startup notification.
Definition kstartupinfo.cpp:1227
const QString & name() const
Returns the name of the startup notification, or empty if not available.
Definition kstartupinfo.cpp:1119
const QString & bin() const
Returns the binary name of the starting application.
Definition kstartupinfo.cpp:1109
void addPid(pid_t pid)
Adds a PID to the list of processes that belong to the startup notification.
Definition kstartupinfo.cpp:1215
void setName(const QString &name)
Sets the name for the notification (e.g. 'Control Center').
Definition kstartupinfo.cpp:1114
void setXinerama(int xinerama)
Sets the Xinerama screen for the startup notification ( i.e.
Definition kstartupinfo.cpp:1257
int screen() const
The X11 screen on which the startup notification is happening, -1 if unknown.
Definition kstartupinfo.cpp:1252
void setWMClass(const QByteArray &wmclass)
Sets a WM_CLASS value for the startup notification, it may be used for increasing the chance that the...
Definition kstartupinfo.cpp:1178
void setIcon(const QString &icon)
Sets the icon for the startup notification (e.g. 'kcontrol').
Definition kstartupinfo.cpp:1150
int xinerama() const
The Xinerama screen for the startup notification, -1 if unknown.
Definition kstartupinfo.cpp:1262
void setBin(const QString &bin)
Sets the binary name of the application (e.g. 'kcontrol').
Definition kstartupinfo.cpp:1104
void setDescription(const QString &descr)
Sets the description for the notification (e.g. 'Launching Control Center').
Definition kstartupinfo.cpp:1132
const QString & icon() const
Returns the icon of the startup notification, or empty if not available.
Definition kstartupinfo.cpp:1163
const QByteArray findWMClass() const
Returns the WM_CLASS value for the startup notification, or binary name if not available.
Definition kstartupinfo.cpp:1183
void setSilent(TriState state)
Sets whether the visual feedback for this startup notification should be silenced (temporarily suspen...
Definition kstartupinfo.cpp:1237
bool is_pid(pid_t pid) const
Checks whether the given pid is in the list of PIDs for startup notification.
Definition kstartupinfo.cpp:1232
QByteArray hostname() const
Returns the hostname for the startup notification.
Definition kstartupinfo.cpp:1210
int desktop() const
Returns the desktop for the startup notification.
Definition kstartupinfo.cpp:1173
void setApplicationId(const QString &desktop)
Sets the .desktop file that was used to initiate the startup notification.
Definition kstartupinfo.cpp:1267
void setScreen(int screen)
Sets the X11 screen on which the startup notification should happen.
Definition kstartupinfo.cpp:1247
const QString & findName() const
Returns the name of the startup notification.
Definition kstartupinfo.cpp:1124
Class representing an identification of application startup notification.
Definition kstartupinfo.h:333
void initId(const QByteArray &id="")
Initializes this object with the given identification ( which may be also "0" for no notification ),...
Definition kstartupinfo.cpp:859
bool setupStartupEnv() const
Sets the startup notification environment variable to this identification.
Definition kstartupinfo.cpp:880
unsigned long timestamp() const
Return the user timestamp for the startup notification, or 0 if no timestamp is set.
Definition kstartupinfo.cpp:939
const QByteArray & id() const
Returns the notification identifier as string.
Definition kstartupinfo.cpp:838
Class for manipulating the application startup notification.
Definition kstartupinfo.h:48
void setTimeout(unsigned int secs)
Sets the timeout for notifications, after this timeout a notification is removed.
Definition kstartupinfo.cpp:749
static void setNewStartupId(QWindow *window, const QByteArray &startup_id)
Use this function if the application got a request with startup notification from outside (for exampl...
Definition kstartupinfo.cpp:557
static void appStarted()
Manual notification that the application has started.
Definition kstartupinfo.cpp:508
KStartupInfo(int flags, QObject *parent=nullptr)
Creates an instance that will receive the startup notifications.
Definition kstartupinfo.cpp:181
static bool sendStartup(const KStartupInfoId &id, const KStartupInfoData &data)
Sends given notification data about started application with the given startup identification.
Definition kstartupinfo.cpp:412
startup_t checkStartup(WId w)
Checks if the given windows matches any existing startup notification.
Definition kstartupinfo.cpp:596
static QByteArray windowStartupId(WId w)
Returns startup notification identification of the given window.
Definition kstartupinfo.cpp:722
static bool sendChange(const KStartupInfoId &id, const KStartupInfoData &data)
Sends given notification data about started application with the given startup identification.
Definition kstartupinfo.cpp:450
static bool sendStartupXcb(xcb_connection_t *conn, int screen, const KStartupInfoId &id, const KStartupInfoData &data)
Like sendStartup , uses conn instead of QX11Info::connection() for sending the info.
Definition kstartupinfo.cpp:420
static void resetStartupEnv()
Unsets the startup notification environment variable.
Definition kstartupinfo.cpp:889
static QByteArray createNewStartupIdForTimestamp(quint32 timestamp)
Creates and returns new startup id with timestamp as user timestamp part.
Definition kstartupinfo.cpp:822
static bool sendChangeXcb(xcb_connection_t *conn, int screen, const KStartupInfoId &id, const KStartupInfoData &data)
Like sendChange , uses conn instead of QX11Info::connection() for sending the info.
Definition kstartupinfo.cpp:458
void gotRemoveStartup(const KStartupInfoId &id, const KStartupInfoData &data)
Emitted when a startup notification is removed (either because it was detected that the application i...
void gotStartupChange(const KStartupInfoId &id, const KStartupInfoData &data)
Emitted when a startup notification changes.
void gotNewStartup(const KStartupInfoId &id, const KStartupInfoData &data)
Emitted when a new startup notification is created (i.e. a new application is being started).
static void setStartupId(const QByteArray &startup_id)
Sets a new value for the application startup notification window property for newly created toplevel ...
Definition kstartupinfo.cpp:532
static bool sendFinish(const KStartupInfoId &id)
Ends startup notification with the given identification.
Definition kstartupinfo.cpp:470
static bool sendFinishXcb(xcb_connection_t *conn, int screen, const KStartupInfoId &id)
Like sendFinish , uses conn instead of QX11Info::connection() for sending the info.
Definition kstartupinfo.cpp:478
static QByteArray createNewStartupId()
Creates and returns new startup id.
Definition kstartupinfo.cpp:813
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
Definition kx11extras.cpp:586
static void setOnDesktop(WId win, int desktop)
Moves window win to desktop desktop.
Definition kx11extras.cpp:696
Sending string messages to other applications using the X Client Messages.
Definition kxmessages.h:33
static bool broadcastMessageX(xcb_connection_t *c, const char *msg_type, const QString &message, int screenNumber)
Broadcasts the given message with the given message type.
Definition kxmessages.cpp:215
bool isSupported(NET::Property property) const
Returns true if the given property is supported by the window manager.
Definition netwm.cpp:2386
const char * startupId() const
Returns the startup notification id of the window.
Definition netwm.cpp:4726
xcb_window_t groupLeader() const
Returns the leader window for the group the window is in, if any.
Definition netwm.cpp:4759
static int timestampCompare(unsigned long time1, unsigned long time2)
Compares two X timestamps, taking into account wrapping and 64bit architectures.
Definition netwm.cpp:4932
Type type(const QSqlDatabase &db)
QString name(StandardAction id)
NETWORKMANAGERQT_EXPORT QString hostname()
QCA_EXPORT void init()
const char * constData() const const
bool isEmpty() const const
bool isNull() const const
qsizetype lastIndexOf(QByteArrayView bv) const const
QByteArray mid(qsizetype pos, qsizetype len) const const
QByteArray toLower() const const
uint toUInt(bool *ok, int base) const const
User
Type type() const const
ConstIterator
void append(QList< T > &&value)
iterator begin()
const_iterator constBegin() const const
const_iterator constEnd() const const
bool contains(const AT &value) const const
iterator end()
T & first()
bool isEmpty() const const
Iterator
iterator begin()
bool contains(const Key &key) const const
iterator end()
iterator erase(const_iterator first, const_iterator last)
iterator find(const Key &key)
iterator insert(const Key &key, const T &value)
bool isEmpty() const const
size_type remove(const Key &key)
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual void customEvent(QEvent *event)
ApplicationsLocation
QString locate(StandardLocation type, const QString &fileName, LocateOptions options)
QString arg(Args &&... args) const const
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
qsizetype length() const const
QString mid(qsizetype position, qsizetype n) const const
void reserve(qsizetype size)
QString simplified() const const
qsizetype size() const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
long toLong(bool *ok, int base) const const
ulong toULong(bool *ok, int base) const const
QByteArray toUtf8() const const
QString trimmed() const const
singleShot
void start()
void stop()
WId winId() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.