USER32: implement GetLastInputInfo
Mike McCormack
mike at codeweavers.com
Thu Apr 21 11:12:28 CDT 2005
ChangeLog:
* implement GetLastInputInfo
-------------- next part --------------
Index: server/protocol.def
===================================================================
RCS file: /home/wine/wine/server/protocol.def,v
retrieving revision 1.130
diff -u -p -r1.130 protocol.def
--- server/protocol.def 20 Apr 2005 13:03:59 -0000 1.130
+++ server/protocol.def 21 Apr 2005 16:10:15 -0000
@@ -2320,3 +2329,8 @@ enum message_type
unsigned int next_msgsize;
@END
#define MAILSLOT_SET_READ_TIMEOUT 1
+
+ at REQ(get_last_input_time)
+ at REPLY
+ unsigned int time;
+ at END
Index: server/queue.c
===================================================================
RCS file: /home/wine/wine/server/queue.c,v
retrieving revision 1.58
diff -u -p -r1.58 queue.c
--- server/queue.c 20 Apr 2005 13:03:59 -0000 1.58
+++ server/queue.c 21 Apr 2005 16:10:15 -0000
@@ -160,6 +161,7 @@ static const struct object_ops thread_in
/* 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 */
@@ -1145,6 +1148,8 @@ static void queue_hardware_message( stru
struct thread_input *input;
unsigned int msg_code;
+ last_input_time = msg->time;
+
win = find_hardware_message_window( queue ? queue->input : foreground_input, msg, &msg_code );
if (!win || !(thread = get_window_thread(win)))
{
@@ -1996,4 +2001,9 @@ DECL_HANDLER(set_caret_info)
if (req->state == -1) input->caret_state = !input->caret_state;
else input->caret_state = !!req->state;
}
+}
+
+DECL_HANDLER(get_last_input_time)
+{
+ reply->time = last_input_time;
}
Index: dlls/user/message.c
===================================================================
RCS file: /home/wine/wine/dlls/user/message.c,v
retrieving revision 1.77
diff -u -p -r1.77 message.c
--- dlls/user/message.c 20 Apr 2005 18:53:53 -0000 1.77
+++ dlls/user/message.c 21 Apr 2005 16:10:15 -0000
@@ -3447,6 +3447,22 @@ BOOL WINAPI IsHungAppWindow( HWND hWnd )
*/
BOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii)
{
- FIXME("%p\n", plii);
- return FALSE;
+ BOOL ret;
+
+ TRACE("%p\n", plii);
+
+ if (plii->cbSize != sizeof (*plii) )
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ SERVER_START_REQ( get_last_input_time )
+ {
+ ret = !wine_server_call_err( req );
+ if (ret)
+ plii->dwTime = reply->time;
+ }
+ SERVER_END_REQ;
+ return ret;
}
More information about the wine-patches
mailing list