[Okular-devel] [PATCH] inhibit screen saver during presentation mode

Pino Toscano pino at kde.org
Sat Aug 30 16:53:50 CEST 2008


Hi Tobias,

> attached is a patch that inhibits the screen saver during
> a presentation by controlling it via the org.freedesktop.ScreenSaver
> interface that is implemented by GNOME and KDE.

The patch is mostly ok, just a couple of notes/questions:

a) can it happen that there are users that do want energy settings in 
presentation mode anyway?

b) instead of inhibitScreenSaver(bool), what about 
inhibitScreenSaver()+allowScreenSaver()?

c)
> +        QDBusMessage reply = QDBusConnection::sessionBus().call( message );
> +        if ( reply.type() == QDBusMessage::ReplyMessage )
> +            m_screenSaverCookie = reply.arguments().first().toInt();

what about a simplier
QDBusReply< int > reply = QDBusConnection::sessionBus().call( message );
if ( reply.isValid() )
    m_screenSaverCookie = reply.value();
?

d) the position of the brackets, please ;)

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/okular-devel/attachments/20080830/9f7e6258/attachment.sig 


More information about the Okular-devel mailing list