[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-hardware-devel
Subject: [Kde-hardware-devel] PowerManager idleTime
From: Thomas Gillespie <tomjamesgillespie () googlemail ! com>
Date: 2008-05-13 20:04:37
Message-ID: 200805132104.44514.tomjamesgillespie () googlemail ! com
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
Hi again,
I'm developing a power manager, and have the following code to get the idle
time:
-------------------------------------------------------------------------------------------------
#include <QX11Info>
#include <X11/extensions/scrnsaver.h>
///Return the Xserver idle time in msecs
int idleTime()
{
XScreenSaverInfo* mitInfo = 0;
mitInfo = XScreenSaverAllocInfo ();
XScreenSaverQueryInfo (QX11Info::display(), DefaultRootWindow
(QX11Info::display()), mitInfo);
return mitInfo->idle;
}
-------------------------------------------------------------------------------------------------
I think this would be better pushed into solid powermanager, or something
similar to this? Any opinions? I could knock up a patch if this sounds ok.
Thanks
Tom
P.s. are the notifiers broken again? I am using notifier() this time :) but
again no output from my test app
["signature.asc" (application/pgp-signature)]
_______________________________________________
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic