[lazarus] Detect Mouse movement

A.J. Venter ajventer at direqlearn.org
Mon Apr 14 09:11:35 EDT 2003


MMMM, depending on what DE you use, there are different approaches here,
one would definitely be Xscreensaver, for example you could set it with
only  kdeinit-shutdown as screensaver, and neatly quit when it
activates, or you add a line to kill a session manager etc.

I am not really sure that you will gain anything by programming it
yourself though.

That said, if you do want to program this, try using something like
SDL_Events, just don't open and SDL screen, and poll the mouse. I cannot
guarantee it will work (at all) but it could.

If all else fails, you could always figure out a way to make unix domain
sockets run promiscuous, then listen in on the X-server/Client coms :-)

A.J.
On Mon, 2003-04-14 at 15:14, David Creelman wrote:
> Hi Steve,
> 
> Would it be sufficient to let XScreenSaver (or equivalent) do this for
> you ?
> 
> If you need more than that.... I don't know, perhaps there is something
> in TScreen ?
> 
> Cheers
> DC
> 
> On Mon, 2003-04-14 at 07:19, SteveG wrote:
> > Is it possible within Lazarus to tell if the mouse has not moved and no 
> > key has been pressed for a period (similar to a screensaver timeout) ?
> > 
> > I need to watch for this for the entire screen / all apps, not just 
> > within my Laz app (to initiate a terminal logout)
> > 
> > Thanks
> > 
> > _________________________________________________________________
> >      To unsubscribe: mail lazarus-request at miraclec.com with
> >                 "unsubscribe" as the Subject
> >    archives at http://www.lazarus.freepascal.org/mailarchives
> 
> 
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
-- 
Story of my life: "Semper in excretum, set alta variant"
A.J. Venter
DireqLearn Linux Guru






More information about the Lazarus mailing list