Bug 164691 - Kopete never auto-aways if screen saver is active
Summary: Kopete never auto-aways if screen saver is active
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-22 20:32 UTC by makosoft
Modified: 2008-07-06 04:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Fix Kopete auto-away (712 bytes, patch)
2008-06-22 21:27 UTC, makosoft
Details

Note You need to log in before you can comment on or make changes to this bug.
Description makosoft 2008-06-22 20:32:02 UTC
Version:            (using Devel)
Installed from:    Compiled sources
OS:                Linux

There's a bug in the Kopete auto-away logic if it detects that a screensaver is active via DBus. From kopete/libkopete/kopeteidletimer.cpp:

QDBusInterface caller("org.freedesktop.ScreenSaver", "/ScreenSaver", "org.freedesktop.ScreenSaver");
QDBusReply<bool> reply = caller.call("GetActive");

bool activity = ( !reply.isValid() || !reply.value() ) ? isActivity() : true;

This means that, if a screensaver is running, the user is always detected as active. Presumably, the final "true" should be "false" - that is, if the screensaver is active, the user should always be detected as inactive (for example see bug 117513). A clearer way to write this would be:

bool activity = ( reply.isValid() && reply.value() ) : false ? isActivity();
Comment 1 makosoft 2008-06-22 21:27:33 UTC
Created attachment 25526 [details]
Fix Kopete auto-away
Comment 2 Matt Rogers 2008-07-06 04:01:13 UTC
SVN commit 828501 by mattr:

Fix bug 164691

The handling of the dbus reply to check for the screensaver was
reversed, so we would always be shown as active if the screensaver
was running.

Patch from makosoft@googlemail.com - Thanks!
Fix should be in Kopete 0.60, which will be released with KDE 4.1
BUG:164691


 M  +2 -1      kopeteidletimer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=828501