App-starting notification support

svn path=/trunk/kdebase/kwin/; revision=46005
This commit is contained in:
Rik Hemsley 2000-04-08 19:35:52 +00:00
parent 281b293440
commit 66b2a8645f
2 changed files with 19 additions and 0 deletions

View file

@ -4,6 +4,8 @@ kwin - the KDE window manager
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
******************************************************************/
#include <klocale.h>
#include <kapp.h>
#include <dcopclient.h>
#include <qapplication.h>
#include <qcursor.h>
#include <qbitmap.h>
@ -463,6 +465,20 @@ void Client::manage( bool isMapped )
}
delete info;
// Notify kicker that an app has mapped a window.
XClassHint xch;
XGetClassHint(qt_xdisplay(), win, &xch);
QByteArray params;
QDataStream stream(params, IO_WriteOnly);
stream << QString::fromUtf8(xch.res_name);
kapp->dcopClient()->send(
"kicker",
"TaskbarApplet",
"clientMapped(QString)",
params
);
}

View file

@ -188,6 +188,9 @@ int main( int argc, char * argv[] )
Application a;
fcntl(ConnectionNumber(qt_xdisplay()), F_SETFD, 1);
DCOPClient * client = a.dcopClient();
client->attach();
client->registerAs(a.name());
return a.exec();