Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ibism!ibism.UUCP!lcp From: lcp@ibism.UUCP (Larry Poleshuck) Newsgroups: comp.windows.x Subject: How to Time Out Inactive Users Message-ID: <12136@ibism.uucp> Date: 28 Jan 91 23:31:24 GMT Sender: news@ibism.uucp Reply-To: ibism!lcp Organization: Citibank IBISM Lines: 25 I am writing an application which must time out my users when they have not touched the keyboard or mouse for a fixed time period, forcing them to re-enter their password. One way to do this might be to put in a time-check in the main event loop. This seems to have quite a large over-head however. Also, I am using Motif (via TeleUSE) and do not wish to re-write my mainLoop. I thought one nice method would be a timeout (every 1 minute or so) which then looks at the sequence number in the xevent. If the sequence numbers are sequential, then there has been no activity since the last timeout. If the timeout generates an xevent. But I can't figure out how to do this anyway. Another way might be to send and event (XSendEvent), register an event handler which does nothing but examine the xevent sequence number, etc. Again, I'm not sure how to do this, or if it will work. Can anyone think of a good way to solve this problem? All responses are greatly appreciated. -- Larry Poleshuck Citibank 111 Wall Street New York, NY 10043 Phone: 212-657-7709 Fax: 212-825-8607 E-Mail: uunet!ibism!lcp