KNotify startup

Rafael Fernández López ereslibre at gmail.com
Wed Jun 6 17:58:16 BST 2007


Hi,

I just wonder why knotify service is note started on the startkde script. I
think it would be really useful. Rivo and me were tracking a strange issue
on KWin, that finally I found where the problem was, and this one is really
really strange. If you wanna follow it, just try, and probably you will
laugh very very high.

Do not start knotify service. Follow the next steps:

- Open an app, and on the dialog title click Configure, so the kwin
configuration dialog is shown. Enable the effects (compositing) to be able
to try this, since this all have to do with effects. We will concentrate on
Shadows, for example. Let's change its opacity to 100%, click OK. Probably
your shadows were updated inmediatly, probably not. Try again, "More
Options", now Opacity "10%", "OK", probably your shadows were updated,
probably not. Now, read the output, you will notice that everytime your
shadows weren't updated you will have a message like:

"knotify: couldn't contact to knotify server", or something like that,
related to knotify.

Now, run knotify and startkde. Do the same, magically all your shadows are
updated inmediatly.

Well, what I have been thinking is that DBUS is looking for knotify somehow,
and the most strange thing is that if you track the calls on
kdebase/workspace/kwin/lib/kwineffects.cpp:

void EffectsHandler::sendReloadMessage( const QString& effectname )
    {
    kDebug( 1212 ) << "sending reload message: " << effectname << endl;

    QDBusMessage message = QDBusMessage::createMethodCall("org.kde.kwin",
"/KWin", "org.kde.KWin", "reloadEffect");
    message << QString("kwin4_effect_" + effectname);
    QDBusConnection::sessionBus().send(message);

    kDebug( 1212 ) << "reload message sent: " << effectname << endl;
    }

So, we go to kdebase/workspace/kwin/effects.cpp:

void EffectsHandlerImpl::reloadEffect( const QString& name )
    {
    kDebug( 1212 ) << "reloading effect: " << name << endl;

    if( isEffectLoaded( name ))
        {
        kDebug( 1212 ) << "i'm being reloaded (" << name << ") (hoozah !!)"
<< endl;
        unloadEffect( name );
        loadEffect( name );
        }
    }

You will notice that, before running knotify, sometimes you got:

sending reload message: ......
reloading effect: ......
i'm being reloaded (......) (hoozah !!)
reload message sent: .....

Others (without running knotify)

sending reload message: ......
knotify: couldnt contact to knotify server (or something similar)
reload message sent: .....

So it's like the message has been lost on the dbus service or something...
no idea really. What I have tested, and hard-tested is that if you run
knotify before starting kde, this will ALWAYS work. And after all, I don't
think running knotify on startkde script will hurt anybody.

Well, just want to know your opinions.



Bye,
Rafael Fernández López.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070606/d936d3ad/attachment.htm>


More information about the kde-core-devel mailing list