Detecting user inactivity & Screensavers

2 messages Options
Embed this post
Permalink
Andy-18

Detecting user inactivity & Screensavers

Reply Threaded More More options
Print post
Permalink
Hi,

I need to detect user inactivity in an app that doesn't have the user's focus. It runs in the background and only processes when the user is active.

Since I couldn't find any direct API to determine the current state of the screensaver, I thought I'd use P/Invokes to do that. I was using the XCB Screensaver library, with the header file http://xcb.freedesktop.org/manual/screensaver_8h-source.html .

I could really use some help on what library to use to detect a screensaver/screen lock but ideally to detect input inactivity.

Thanks!
Anirudh

--
Fifth Year Undergrad - Indian Institute of Technology Kharagpur
http://anirudhsanjeev.org

_______________________________________________
Mono-list maillist  -  [hidden email]
http://lists.ximian.com/mailman/listinfo/mono-list
Chris Howie

Re: Detecting user inactivity & Screensavers

Reply Threaded More More options
Print post
Permalink
On Mon, Oct 26, 2009 at 12:18 PM, Andy <[hidden email]> wrote:
> I need to detect user inactivity in an app that doesn't have the user's
> focus. It runs in the background and only processes when the user is active.

You might try converting the C example given in this thread:

http://ubuntuforums.org/showthread.php?t=1252752

--
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers
_______________________________________________
Mono-list maillist  -  [hidden email]
http://lists.ximian.com/mailman/listinfo/mono-list