KDE/kdebase/workspace/ksmserver

Lubos Lunak l.lunak at suse.cz
Mon Feb 9 10:20:09 GMT 2009


On Monday 09 of February 2009, Dario Freddi wrote:
> On lunedì 09 febbraio 2009 10:00:01 Lubos Lunak wrote:
> >  I don't understand this. When logout is confirmed and before it actually
> > takes place, all applications are notified about this and can cancel the
> > logout. What is the problem with that?
>
> The problem is not about canceling the logout, from the bug's description:
>
> "My laptop started suspending while it was shutting down KDE. After opening
> the laptop, it continued with the shutdown procedure, and fired signals to
> init."

 I read that. Until the user confirms the logout, there's no problem. After 
the logout is confirmed, apps get a notification and can either cancel the 
logout (and thus shutdown) or other way around PowerDevil can ignore the 
suspend if it's done during logout. The Qt API for session management is 
rather limited, but what other problem is there besides that?

> That's what I aimed to solve. About notifying all application, the only
> thing I know about is QApplication::saveStateRequest() signal, though my
> main concern is that, being PowerDevil a kded module and the signal not in
> QCoreApplication, this could not work for non-graphical application, but I
> might be wrong, that's why I asked for some more pointers.

 Libkdeui has KSessionManager class, which can do the same without the need to 
subclass QApplication. Or for cases like KDED modules where KDED itself 
provides the application object.

> In any case, if putting such a signal can be an issue,

 It certainly looks like a kludge instead of a proper solution after the first 
look.

> I already have a 
> patch that triggers an inhibition from ksmserver. This could be even
> cleaner and a preferrable way, so in any case I think I'm going to revert
> the commit. Though, if anyone wants to review this, I can post the patch on
> the list.

 Yes, I would want to see such a patch before it would be committed.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http://www.suse.cz




More information about the kde-core-devel mailing list