[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#416824: The ultimate solution (hopefully!)



tags 416824 +patch
thanks

Hello:

  I hope this is the last one for this bug :P I have posted 2 patches to the 
kde bug report which presumably solves the problem. I have tested them 
creating the whole kdeutils packages and installing them on my system. With 
both of them the desktop is really locked, before the hibernate method is 
called.

  They are 2 since I tried to do them in a way which I thought simpler, still 
I think it is but KDE people may think it's very intrusive in such a mature 
stage KDE3 is. Taken this into account, a created a sencond patch which uses 
a more similar approach for DCOP locking than the one is used on vanilla KDE.

  The first one is called 16_klaptop-dcopref.diff and the second one is called 
16_klaptopdaemon_dcopcall.diff they are both attached. Now this is as free 
SW, choose the one you want.

  But please, before anything else I would like to have feedback from anyone 
using this patches. I could even send him/her the deb package of 
klaptopdaemon patched which the one he/she like. This is what I think best of 
having them definately into an official Debian package, so candidates wanted.

  Regards,

-- 
     Raúl Sánchez Siles
----->Proud Debian user<-----
Linux registered user #416098
Index: kdeutils-3.5.7/klaptopdaemon/daemondock.cpp
===================================================================
--- kdeutils-3.5.7/klaptopdaemon/daemondock.cpp	(revisión: 677792)
+++ kdeutils-3.5.7/klaptopdaemon/daemondock.cpp	(copia de trabajo)
@@ -500,8 +500,15 @@
 void laptop_dock::invokeLockHibernation()
 {
   DCOPClient* client = kapp->dcopClient();
-  if (client)
-      client->send("kdesktop", "KScreensaverIface", "lock()", "");
+
+  if (client && client->isAttached())
+  {
+    QCString replyType; 
+    QByteArray replyData;
+
+    client->call("kdesktop", "KScreensaverIface", "lock()",
+                  QByteArray(), replyType, replyData);
+  }
   laptop_portable::invoke_hibernation();
 }
 void laptop_dock::invokeStandby()
Index: kdeutils-3.5.7/klaptopdaemon/daemondock.cpp
===================================================================
--- kdeutils-3.5.7/klaptopdaemon/daemondock.cpp	(revisión: 677792)
+++ kdeutils-3.5.7/klaptopdaemon/daemondock.cpp	(copia de trabajo)
@@ -30,6 +30,7 @@
 #include <klocale.h>
 #include <kpopupmenu.h>
 #include <dcopclient.h>
+#include <dcopref.h>
 #include "kpcmciainfo.h"
 #include "daemondock.h"
 #include "portable.h"
@@ -499,9 +500,9 @@
 
 void laptop_dock::invokeLockHibernation()
 {
-  DCOPClient* client = kapp->dcopClient();
-  if (client)
-      client->send("kdesktop", "KScreensaverIface", "lock()", "");
+  DCOPRef dr("kdesktop", "KScreensaverIface");
+  DCOPReply reply=dr.call("lock");
+
   laptop_portable::invoke_hibernation();
 }
 void laptop_dock::invokeStandby()

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: