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>
This commit is contained in:
parent
fb7cc99f8a
commit
434871fd1b
|
@ -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;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -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 616
|
||||
#define SERVER_PROTOCOL_VERSION 617
|
||||
|
||||
/* ### protocol_version end ### */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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,11 +1397,6 @@ 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)
|
||||
{
|
||||
struct message *other;
|
||||
int clr_bit;
|
||||
|
||||
clr_bit = get_hardware_msg_bit( msg );
|
||||
LIST_FOR_EACH_ENTRY( other, &input->msg_list, struct message, entry )
|
||||
{
|
||||
|
@ -1416,7 +1411,6 @@ static void release_hardware_message( struct msg_queue *queue, unsigned int hw_i
|
|||
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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue