Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-04

Detect Mouse movement

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

SteveG
to SteveG: Is it possible within Lazarus to tell if the mouse has not moved and no key has been…

Thanks for the prompt Dave - made me start thinking ! TMouse gives all I need -

David Creelman wrote 33 lines
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 with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

A.J. Venter
to SteveG: Is it possible within Lazarus to tell if the mouse has not moved and no key has been…

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.

David Creelman wrote 30 lines
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 with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives _________________________________________________________________ To unsubscribe: mail 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

Reply by email

SteveG

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

Reply by email

David Creelman
to SteveG

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

SteveG wrote 12 lines
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 with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email