--- kopete/libkopete/kopeteaway.cpp.orig 2006-05-31 02:24:05.000000000 +0200 +++ kopete/libkopete/kopeteaway.cpp 2006-06-09 21:40:45.000000000 +0200 @@ -198,6 +198,8 @@ Kopete::Away::~Away() { + if(this == instance) + instance = 0L; delete d; } @@ -325,8 +327,17 @@ // activity while locked never matters (if there is any, it's probably just // the cleaner wiping the keyboard :). + + /* we should be able to respond to KDesktop queries to avoid a deadlock, so we allow the event loop to be called */ + static bool rentrency_protection=false; + if(rentrency_protection) + return; + rentrency_protection=true; DCOPRef screenSaver("kdesktop", "KScreensaverIface"); - DCOPReply isBlanked = screenSaver.call("isBlanked"); + DCOPReply isBlanked = screenSaver.callExt("isBlanked" , DCOPRef::UseEventLoop, 10); + rentrency_protection=false; + if(!instance) //this may have been deleted in the event loop + return; if (!(isBlanked.isValid() && isBlanked.type == "bool" && ((bool)isBlanked))) { // DCOP failed, or returned something odd, or the screensaver is