From 66b2a8645f94ae571d138dad6e02e7d02f628203 Mon Sep 17 00:00:00 2001 From: Rik Hemsley Date: Sat, 8 Apr 2000 19:35:52 +0000 Subject: [PATCH] App-starting notification support svn path=/trunk/kdebase/kwin/; revision=46005 --- client.cpp | 16 ++++++++++++++++ main.cpp | 3 +++ 2 files changed, 19 insertions(+) diff --git a/client.cpp b/client.cpp index 2b087103b1..95957e72f8 100644 --- a/client.cpp +++ b/client.cpp @@ -4,6 +4,8 @@ kwin - the KDE window manager Copyright (C) 1999, 2000 Matthias Ettrich ******************************************************************/ #include +#include +#include #include #include #include @@ -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 + ); } diff --git a/main.cpp b/main.cpp index cc2a3d88b6..f6e0df3cd1 100644 --- a/main.cpp +++ b/main.cpp @@ -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();