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
434871fd
Commit
434871fd
authored
Jul 07, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Jul 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Remove unnecessary 'remove' parameter from accept_hardware_message request.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fb7cc99f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
38 deletions
+26
-38
message.c
dlls/user32/message.c
+8
-9
server_protocol.h
include/wine/server_protocol.h
+1
-3
protocol.def
server/protocol.def
+1
-2
queue.c
server/queue.c
+15
-21
request.h
server/request.h
+1
-2
trace.c
server/trace.c
+0
-1
No files found.
dlls/user32/message.c
View file @
434871fd
...
...
@@ -2271,12 +2271,11 @@ static void send_parent_notify( HWND hwnd, WORD event, WORD idChild, POINT pt )
* Tell the server we have passed the message to the app
* (even though we may end up dropping it later on)
*/
static
void
accept_hardware_message
(
UINT
hw_id
,
BOOL
remove
)
static
void
accept_hardware_message
(
UINT
hw_id
)
{
SERVER_START_REQ
(
accept_hardware_message
)
{
req
->
hw_id
=
hw_id
;
req
->
remove
=
remove
;
req
->
hw_id
=
hw_id
;
if
(
wine_server_call
(
req
))
FIXME
(
"Failed to reply to MSG_HARDWARE message. Message may not be removed from queue.
\n
"
);
}
...
...
@@ -2363,10 +2362,10 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
{
/* skip this message */
HOOK_CallHooks
(
WH_CBT
,
HCBT_KEYSKIPPED
,
LOWORD
(
msg
->
wParam
),
msg
->
lParam
,
TRUE
);
accept_hardware_message
(
hw_id
,
TRUE
);
accept_hardware_message
(
hw_id
);
return
FALSE
;
}
accept_hardware_message
(
hw_id
,
remove
);
if
(
remove
)
accept_hardware_message
(
hw_id
);
msg
->
pt
=
point_phys_to_win_dpi
(
msg
->
hwnd
,
msg
->
pt
);
if
(
remove
&&
msg
->
message
==
WM_KEYDOWN
)
...
...
@@ -2421,7 +2420,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
if
(
!
msg
->
hwnd
||
!
WIN_IsCurrentThread
(
msg
->
hwnd
))
{
accept_hardware_message
(
hw_id
,
TRUE
);
accept_hardware_message
(
hw_id
);
return
FALSE
;
}
...
...
@@ -2517,7 +2516,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
hook
.
s
.
dwExtraInfo
=
extra_info
;
hook
.
mouseData
=
msg
->
wParam
;
HOOK_CallHooks
(
WH_CBT
,
HCBT_CLICKSKIPPED
,
message
,
(
LPARAM
)
&
hook
,
TRUE
);
accept_hardware_message
(
hw_id
,
TRUE
);
accept_hardware_message
(
hw_id
);
return
FALSE
;
}
...
...
@@ -2525,11 +2524,11 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
{
SendMessageW
(
msg
->
hwnd
,
WM_SETCURSOR
,
(
WPARAM
)
msg
->
hwnd
,
MAKELONG
(
hittest
,
msg
->
message
));
accept_hardware_message
(
hw_id
,
TRUE
);
accept_hardware_message
(
hw_id
);
return
FALSE
;
}
accept_hardware_message
(
hw_id
,
remove
);
if
(
remove
)
accept_hardware_message
(
hw_id
);
if
(
!
remove
||
info
.
hwndCapture
)
{
...
...
include/wine/server_protocol.h
View file @
434871fd
...
...
@@ -3197,8 +3197,6 @@ struct accept_hardware_message_request
{
struct
request_header
__header
;
unsigned
int
hw_id
;
int
remove
;
char
__pad_20
[
4
];
};
struct
accept_hardware_message_reply
{
...
...
@@ -6671,7 +6669,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 61
6
#define SERVER_PROTOCOL_VERSION 61
7
/* ### protocol_version end ### */
...
...
server/protocol.def
View file @
434871fd
...
...
@@ -2352,10 +2352,9 @@ enum message_type
@END
/* Accept the current hardware message */
/* Accept
and remove
the current hardware message */
@REQ(accept_hardware_message)
unsigned int hw_id; /* id of the hardware message */
int remove; /* should we remove the message? */
@END
...
...
server/queue.c
View file @
434871fd
...
...
@@ -1384,11 +1384,11 @@ static void update_desktop_mouse_state( struct desktop *desktop, unsigned int fl
}
/* release the hardware message currently being processed by the given thread */
static
void
release_hardware_message
(
struct
msg_queue
*
queue
,
unsigned
int
hw_id
,
int
remove
)
static
void
release_hardware_message
(
struct
msg_queue
*
queue
,
unsigned
int
hw_id
)
{
struct
thread_input
*
input
=
queue
->
input
;
struct
message
*
msg
;
struct
message
*
msg
,
*
other
;
int
clr_bit
;
LIST_FOR_EACH_ENTRY
(
msg
,
&
input
->
msg_list
,
struct
message
,
entry
)
{
...
...
@@ -1397,26 +1397,20 @@ static void release_hardware_message( struct msg_queue *queue, unsigned int hw_i
if
(
&
msg
->
entry
==
&
input
->
msg_list
)
return
;
/* not found */
/* clear the queue bit for that message */
if
(
remove
)
clr_bit
=
get_hardware_msg_bit
(
msg
);
LIST_FOR_EACH_ENTRY
(
other
,
&
input
->
msg_list
,
struct
message
,
entry
)
{
struct
message
*
other
;
int
clr_bit
;
clr_bit
=
get_hardware_msg_bit
(
msg
);
LIST_FOR_EACH_ENTRY
(
other
,
&
input
->
msg_list
,
struct
message
,
entry
)
if
(
other
!=
msg
&&
get_hardware_msg_bit
(
other
)
==
clr_bit
)
{
if
(
other
!=
msg
&&
get_hardware_msg_bit
(
other
)
==
clr_bit
)
{
clr_bit
=
0
;
break
;
}
clr_bit
=
0
;
break
;
}
if
(
clr_bit
)
clear_queue_bits
(
queue
,
clr_bit
);
update_input_key_state
(
input
->
desktop
,
input
->
keystate
,
msg
->
msg
,
msg
->
wparam
);
list_remove
(
&
msg
->
entry
);
free_message
(
msg
);
}
if
(
clr_bit
)
clear_queue_bits
(
queue
,
clr_bit
);
update_input_key_state
(
input
->
desktop
,
input
->
keystate
,
msg
->
msg
,
msg
->
wparam
);
list_remove
(
&
msg
->
entry
);
free_message
(
msg
);
}
static
int
queue_hotkey_message
(
struct
desktop
*
desktop
,
struct
message
*
msg
)
...
...
@@ -2080,7 +2074,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
data
->
hw_id
=
msg
->
unique_id
;
set_reply_data
(
msg
->
data
,
msg
->
data_size
);
if
(
msg
->
msg
==
WM_INPUT
&&
(
flags
&
PM_REMOVE
))
release_hardware_message
(
current
->
queue
,
data
->
hw_id
,
1
);
release_hardware_message
(
current
->
queue
,
data
->
hw_id
);
return
1
;
}
/* nothing found, clear the hardware queue bits */
...
...
@@ -2606,7 +2600,7 @@ DECL_HANDLER(reply_message)
DECL_HANDLER
(
accept_hardware_message
)
{
if
(
current
->
queue
)
release_hardware_message
(
current
->
queue
,
req
->
hw_id
,
req
->
remove
);
release_hardware_message
(
current
->
queue
,
req
->
hw_id
);
else
set_error
(
STATUS_ACCESS_DENIED
);
}
...
...
server/request.h
View file @
434871fd
...
...
@@ -1567,8 +1567,7 @@ C_ASSERT( FIELD_OFFSET(struct reply_message_request, remove) == 12 );
C_ASSERT
(
FIELD_OFFSET
(
struct
reply_message_request
,
result
)
==
16
);
C_ASSERT
(
sizeof
(
struct
reply_message_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
accept_hardware_message_request
,
hw_id
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
accept_hardware_message_request
,
remove
)
==
16
);
C_ASSERT
(
sizeof
(
struct
accept_hardware_message_request
)
==
24
);
C_ASSERT
(
sizeof
(
struct
accept_hardware_message_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_reply_request
,
cancel
)
==
12
);
C_ASSERT
(
sizeof
(
struct
get_message_reply_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_reply_reply
,
result
)
==
8
);
...
...
server/trace.c
View file @
434871fd
...
...
@@ -2887,7 +2887,6 @@ static void dump_reply_message_request( const struct reply_message_request *req
static
void
dump_accept_hardware_message_request
(
const
struct
accept_hardware_message_request
*
req
)
{
fprintf
(
stderr
,
" hw_id=%08x"
,
req
->
hw_id
);
fprintf
(
stderr
,
", remove=%d"
,
req
->
remove
);
}
static
void
dump_get_message_reply_request
(
const
struct
get_message_reply_request
*
req
)
...
...
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