Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
02442b52
Commit
02442b52
authored
Jan 07, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Return the cursor position in send_hardware_message and use it to update…
user32: Return the cursor position in send_hardware_message and use it to update the driver's position.
parent
9c112996
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
17 deletions
+37
-17
input.c
dlls/user32/input.c
+1
-13
message.c
dlls/user32/message.c
+11
-1
server_protocol.h
include/wine/server_protocol.h
+6
-2
protocol.def
server/protocol.def
+4
-0
queue.c
server/queue.c
+6
-0
request.h
server/request.h
+5
-1
trace.c
server/trace.c
+4
-0
No files found.
dlls/user32/input.c
View file @
02442b52
...
...
@@ -180,19 +180,7 @@ UINT WINAPI SendInput( UINT count, LPINPUT inputs, int size )
/* we need to update the coordinates to what the server expects */
INPUT
input
=
inputs
[
i
];
update_mouse_coords
(
&
input
);
if
(
!
(
status
=
send_hardware_message
(
0
,
&
input
,
SEND_HWMSG_INJECTED
)))
{
if
((
input
.
u
.
mi
.
dwFlags
&
MOUSEEVENTF_MOVE
)
&&
((
input
.
u
.
mi
.
dwFlags
&
MOUSEEVENTF_ABSOLUTE
)
||
input
.
u
.
mi
.
dx
||
input
.
u
.
mi
.
dy
))
{
/* we have to actually move the cursor */
POINT
pt
;
GetCursorPos
(
&
pt
);
if
(
!
(
input
.
u
.
mi
.
dwFlags
&
MOUSEEVENTF_ABSOLUTE
)
||
pt
.
x
!=
input
.
u
.
mi
.
dx
||
pt
.
y
!=
input
.
u
.
mi
.
dy
)
USER_Driver
->
pSetCursorPos
(
pt
.
x
,
pt
.
y
);
}
}
status
=
send_hardware_message
(
0
,
&
input
,
SEND_HWMSG_INJECTED
);
}
else
status
=
send_hardware_message
(
0
,
&
inputs
[
i
],
SEND_HWMSG_INJECTED
);
...
...
dlls/user32/message.c
View file @
02442b52
...
...
@@ -3114,6 +3114,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, UINT flags )
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
struct
send_message_info
info
;
int
prev_x
,
prev_y
,
new_x
,
new_y
;
NTSTATUS
ret
;
BOOL
wait
;
...
...
@@ -3153,10 +3154,19 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, UINT flags )
if
(
thread_info
->
key_state
)
wine_server_set_reply
(
req
,
thread_info
->
key_state
,
256
);
ret
=
wine_server_call
(
req
);
wait
=
reply
->
wait
;
prev_x
=
reply
->
prev_x
;
prev_y
=
reply
->
prev_y
;
new_x
=
reply
->
new_x
;
new_y
=
reply
->
new_y
;
}
SERVER_END_REQ
;
if
(
!
ret
&&
thread_info
->
key_state
)
thread_info
->
key_state_time
=
GetTickCount
();
if
(
!
ret
)
{
if
(
thread_info
->
key_state
)
thread_info
->
key_state_time
=
GetTickCount
();
if
((
flags
&
SEND_HWMSG_INJECTED
)
&&
(
prev_x
!=
new_x
||
prev_y
!=
new_y
))
USER_Driver
->
pSetCursorPos
(
new_x
,
new_y
);
}
if
(
wait
)
{
...
...
include/wine/server_protocol.h
View file @
02442b52
...
...
@@ -2796,8 +2796,12 @@ struct send_hardware_message_reply
{
struct
reply_header
__header
;
int
wait
;
int
prev_x
;
int
prev_y
;
int
new_x
;
int
new_y
;
/* VARARG(keystate,bytes); */
char
__pad_
12
[
4
];
char
__pad_
28
[
4
];
};
#define SEND_HWMSG_INJECTED 0x01
...
...
@@ -5640,6 +5644,6 @@ union generic_reply
struct
set_suspend_context_reply
set_suspend_context_reply
;
};
#define SERVER_PROTOCOL_VERSION 4
29
#define SERVER_PROTOCOL_VERSION 4
30
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
02442b52
...
...
@@ -2032,6 +2032,10 @@ enum message_type
unsigned int flags; /* flags (see below) */
@REPLY
int wait; /* do we need to wait for a reply? */
int prev_x; /* previous cursor position */
int prev_y;
int new_x; /* new cursor position */
int new_y;
VARARG(keystate,bytes); /* global state array for all the keys */
@END
#define SEND_HWMSG_INJECTED 0x01
...
...
server/queue.c
View file @
02442b52
...
...
@@ -2204,6 +2204,9 @@ DECL_HANDLER(send_hardware_message)
}
}
reply
->
prev_x
=
desktop
->
cursor
.
x
;
reply
->
prev_y
=
desktop
->
cursor
.
y
;
switch
(
req
->
input
.
type
)
{
case
INPUT_MOUSE
:
...
...
@@ -2219,6 +2222,9 @@ DECL_HANDLER(send_hardware_message)
set_error
(
STATUS_INVALID_PARAMETER
);
}
if
(
thread
)
release_object
(
thread
);
reply
->
new_x
=
desktop
->
cursor
.
x
;
reply
->
new_y
=
desktop
->
cursor
.
y
;
set_reply_data
(
desktop
->
keystate
,
size
);
release_object
(
desktop
);
}
...
...
server/request.h
View file @
02442b52
...
...
@@ -1391,7 +1391,11 @@ C_ASSERT( FIELD_OFFSET(struct send_hardware_message_request, input) == 16 );
C_ASSERT
(
FIELD_OFFSET
(
struct
send_hardware_message_request
,
flags
)
==
48
);
C_ASSERT
(
sizeof
(
struct
send_hardware_message_request
)
==
56
);
C_ASSERT
(
FIELD_OFFSET
(
struct
send_hardware_message_reply
,
wait
)
==
8
);
C_ASSERT
(
sizeof
(
struct
send_hardware_message_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
send_hardware_message_reply
,
prev_x
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
send_hardware_message_reply
,
prev_y
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
send_hardware_message_reply
,
new_x
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
send_hardware_message_reply
,
new_y
)
==
24
);
C_ASSERT
(
sizeof
(
struct
send_hardware_message_reply
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_request
,
flags
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_request
,
get_win
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_request
,
get_first
)
==
20
);
...
...
server/trace.c
View file @
02442b52
...
...
@@ -2452,6 +2452,10 @@ static void dump_send_hardware_message_request( const struct send_hardware_messa
static
void
dump_send_hardware_message_reply
(
const
struct
send_hardware_message_reply
*
req
)
{
fprintf
(
stderr
,
" wait=%d"
,
req
->
wait
);
fprintf
(
stderr
,
", prev_x=%d"
,
req
->
prev_x
);
fprintf
(
stderr
,
", prev_y=%d"
,
req
->
prev_y
);
fprintf
(
stderr
,
", new_x=%d"
,
req
->
new_x
);
fprintf
(
stderr
,
", new_y=%d"
,
req
->
new_y
);
dump_varargs_bytes
(
", keystate="
,
cur_size
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment