On Wed, Dec 1, 2010 at 4:39 AM, Tristan Bonsall
<[email protected]> wrote:
> My application has a log-in system to enable certain areas of the
> interface. Given a period of user-inactivity, the client would like it
> to fall back to the default level of access.
>
> I need to restart a single-shot WTimer every time the user interacts
> with the interface, but I cannot find a way to single out just those
> events. The only hook I can see is WApplication::notify, but that
> receives events for reasons other than user interaction.
>
> Is there any place I can intercept these events? Or is there another way
> to achieve this functionality?

I would just create some javascript that does that by watching for
mouse/keyboard/touch/etc... inputs and callback into a Wt jslot that
'updates' your session, with a specific enough delay in between to
prevent swamping the connection, probably just record when last
'interaction was and have a timer fire off on the page every 30
seconds or two minutes or something and set that last delta, and when
the delta exceeds whatever timeout you want, then end the session.

------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to