Implemented GetLastInputInfo.

diff --git a/server/queue.c b/server/queue.c
index 83f908e..a0617a1 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -167,6 +167,7 @@
 
 /* pointer to input structure of foreground thread */
 static struct thread_input *foreground_input;
+static unsigned int last_input_time;
 
 
 /* set the caret window in a given thread input */
@@ -1154,6 +1155,8 @@
     struct thread_input *input;
     unsigned int msg_code;
 
+    last_input_time = get_tick_count();
+
     win = find_hardware_message_window( queue ? queue->input : foreground_input, msg, &msg_code );
     if (!win || !(thread = get_window_thread(win)))
     {
@@ -2006,3 +2009,10 @@
         else input->caret_state = !!req->state;
     }
 }
+
+
+/* get the time of the last input event */
+DECL_HANDLER(get_last_input_time)
+{
+    reply->time = last_input_time;
+}