Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
cd28e2be
Commit
cd28e2be
authored
Apr 20, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Return the current cursor when queuing a hardware message.
parent
3044d734
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
14 deletions
+32
-14
server_protocol.h
include/wine/server_protocol.h
+3
-1
protocol.def
server/protocol.def
+3
-0
queue.c
server/queue.c
+16
-12
request.h
server/request.h
+3
-0
trace.c
server/trace.c
+7
-1
No files found.
include/wine/server_protocol.h
View file @
cd28e2be
...
...
@@ -2751,6 +2751,8 @@ struct send_hardware_message_request
struct
send_hardware_message_reply
{
struct
reply_header
__header
;
user_handle_t
cursor
;
int
count
;
};
...
...
@@ -5481,6 +5483,6 @@ union generic_reply
struct
set_cursor_reply
set_cursor_reply
;
};
#define SERVER_PROTOCOL_VERSION
399
#define SERVER_PROTOCOL_VERSION
400
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
cd28e2be
...
...
@@ -1992,6 +1992,9 @@ enum message_type
int x; /* x position */
int y; /* y position */
unsigned int time; /* message time */
@REPLY
user_handle_t cursor; /* current cursor for the target thread input */
int count; /* current cursor count */
@END
...
...
server/queue.c
View file @
cd28e2be
...
...
@@ -1262,12 +1262,11 @@ static user_handle_t find_hardware_message_window( struct thread_input *input, s
}
/* queue a hardware message into a given thread input */
static
void
queue_hardware_message
(
struct
msg_queue
*
queue
,
struct
message
*
msg
,
static
void
queue_hardware_message
(
struct
thread_input
*
input
,
struct
message
*
msg
,
struct
hardware_msg_data
*
data
)
{
user_handle_t
win
;
struct
thread
*
thread
;
struct
thread_input
*
input
=
queue
?
queue
->
input
:
foreground_input
;
unsigned
int
msg_code
;
last_input_time
=
get_tick_count
();
...
...
@@ -1704,20 +1703,20 @@ DECL_HANDLER(send_message)
DECL_HANDLER
(
send_hardware_message
)
{
struct
message
*
msg
;
struct
msg_queue
*
recv_queue
=
NULL
;
struct
thread
*
thread
=
NULL
;
struct
hardware_msg_data
*
data
;
struct
thread_input
*
input
=
foreground_input
;
if
(
req
->
id
)
{
if
(
!
(
thread
=
get_thread_from_id
(
req
->
id
)))
return
;
}
if
(
thread
&&
!
(
recv_queue
=
thread
->
queue
))
{
set_error
(
STATUS_INVALID_PARAMETER
)
;
release_object
(
thread
);
return
;
if
(
!
thread
->
queue
)
{
set_error
(
STATUS_INVALID_PARAMETER
);
release_object
(
thread
);
return
;
}
input
=
thread
->
queue
->
input
;
}
if
(
!
(
data
=
mem_alloc
(
sizeof
(
*
data
)
)))
...
...
@@ -1741,11 +1740,16 @@ DECL_HANDLER(send_hardware_message)
msg
->
result
=
NULL
;
msg
->
data
=
data
;
msg
->
data_size
=
sizeof
(
*
data
);
queue_hardware_message
(
recv_queue
,
msg
,
data
);
queue_hardware_message
(
input
,
msg
,
data
);
}
else
free
(
data
);
if
(
thread
)
release_object
(
thread
);
if
(
thread
)
{
reply
->
cursor
=
input
->
cursor
;
reply
->
count
=
input
->
cursor_count
;
release_object
(
thread
);
}
}
/* post a quit message to the current queue */
...
...
server/request.h
View file @
cd28e2be
...
...
@@ -1381,6 +1381,9 @@ C_ASSERT( FIELD_OFFSET(struct send_hardware_message_request, x) == 48 );
C_ASSERT
(
FIELD_OFFSET
(
struct
send_hardware_message_request
,
y
)
==
52
);
C_ASSERT
(
FIELD_OFFSET
(
struct
send_hardware_message_request
,
time
)
==
56
);
C_ASSERT
(
sizeof
(
struct
send_hardware_message_request
)
==
64
);
C_ASSERT
(
FIELD_OFFSET
(
struct
send_hardware_message_reply
,
cursor
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
send_hardware_message_reply
,
count
)
==
12
);
C_ASSERT
(
sizeof
(
struct
send_hardware_message_reply
)
==
16
);
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 @
cd28e2be
...
...
@@ -2427,6 +2427,12 @@ static void dump_send_hardware_message_request( const struct send_hardware_messa
fprintf
(
stderr
,
", time=%08x"
,
req
->
time
);
}
static
void
dump_send_hardware_message_reply
(
const
struct
send_hardware_message_reply
*
req
)
{
fprintf
(
stderr
,
" cursor=%08x"
,
req
->
cursor
);
fprintf
(
stderr
,
", count=%d"
,
req
->
count
);
}
static
void
dump_get_message_request
(
const
struct
get_message_request
*
req
)
{
fprintf
(
stderr
,
" flags=%08x"
,
req
->
flags
);
...
...
@@ -4190,7 +4196,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_process_idle_event_reply
,
NULL
,
NULL
,
NULL
,
(
dump_func
)
dump_send_hardware_message_reply
,
(
dump_func
)
dump_get_message_reply
,
NULL
,
NULL
,
...
...
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