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
f747e5c8
Commit
f747e5c8
authored
Oct 14, 2014
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Don't move mouse hardware messages to other threads queues.
parent
3f1bbdca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
38 deletions
+11
-38
message.c
dlls/user32/message.c
+7
-8
protocol.def
server/protocol.def
+0
-1
queue.c
server/queue.c
+4
-29
No files found.
dlls/user32/message.c
View file @
f747e5c8
...
...
@@ -2266,13 +2266,12 @@ 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
,
HWND
new_hwnd
)
static
void
accept_hardware_message
(
UINT
hw_id
,
BOOL
remove
)
{
SERVER_START_REQ
(
accept_hardware_message
)
{
req
->
hw_id
=
hw_id
;
req
->
remove
=
remove
;
req
->
new_win
=
wine_server_user_handle
(
new_hwnd
);
if
(
wine_server_call
(
req
))
FIXME
(
"Failed to reply to MSG_HARDWARE message. Message may not be removed from queue.
\n
"
);
}
...
...
@@ -2460,10 +2459,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
,
0
);
accept_hardware_message
(
hw_id
,
TRUE
);
return
FALSE
;
}
accept_hardware_message
(
hw_id
,
remove
,
0
);
accept_hardware_message
(
hw_id
,
remove
);
if
(
remove
&&
msg
->
message
==
WM_KEYDOWN
)
if
(
ImmProcessKey
(
msg
->
hwnd
,
GetKeyboardLayout
(
0
),
msg
->
wParam
,
msg
->
lParam
,
0
)
)
...
...
@@ -2507,7 +2506,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
,
msg
->
hwnd
);
accept_hardware_message
(
hw_id
,
TRUE
);
return
FALSE
;
}
...
...
@@ -2596,7 +2595,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
hook
.
wHitTestCode
=
hittest
;
hook
.
dwExtraInfo
=
extra_info
;
HOOK_CallHooks
(
WH_CBT
,
HCBT_CLICKSKIPPED
,
message
,
(
LPARAM
)
&
hook
,
TRUE
);
accept_hardware_message
(
hw_id
,
TRUE
,
0
);
accept_hardware_message
(
hw_id
,
TRUE
);
return
FALSE
;
}
...
...
@@ -2604,11 +2603,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
,
0
);
accept_hardware_message
(
hw_id
,
TRUE
);
return
FALSE
;
}
accept_hardware_message
(
hw_id
,
remove
,
0
);
accept_hardware_message
(
hw_id
,
remove
);
if
(
!
remove
||
info
.
hwndCapture
)
{
...
...
server/protocol.def
View file @
f747e5c8
...
...
@@ -2156,7 +2156,6 @@ enum message_type
@REQ(accept_hardware_message)
unsigned int hw_id; /* id of the hardware message */
int remove; /* should we remove the message? */
user_handle_t new_win; /* new destination window for current message */
@END
...
...
server/queue.c
View file @
f747e5c8
...
...
@@ -1281,7 +1281,7 @@ static void update_input_key_state( struct desktop *desktop, unsigned char *keys
/* 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
,
user_handle_t
new_win
)
int
remove
)
{
struct
thread_input
*
input
=
queue
->
input
;
struct
message
*
msg
;
...
...
@@ -1293,7 +1293,7 @@ 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
||
new_win
)
if
(
remove
)
{
struct
message
*
other
;
int
clr_bit
;
...
...
@@ -1308,32 +1308,7 @@ static void release_hardware_message( struct msg_queue *queue, unsigned int hw_i
}
}
if
(
clr_bit
)
clear_queue_bits
(
queue
,
clr_bit
);
}
if
(
new_win
)
/* set the new window */
{
struct
thread
*
owner
=
get_window_thread
(
new_win
);
if
(
owner
)
{
msg
->
win
=
new_win
;
if
(
owner
->
queue
->
input
!=
input
)
{
list_remove
(
&
msg
->
entry
);
if
(
merge_message
(
owner
->
queue
->
input
,
msg
))
{
free_message
(
msg
);
release_object
(
owner
);
return
;
}
list_add_tail
(
&
owner
->
queue
->
input
->
msg_list
,
&
msg
->
entry
);
}
set_queue_bits
(
owner
->
queue
,
get_hardware_msg_bit
(
msg
));
remove
=
0
;
release_object
(
owner
);
}
}
if
(
remove
)
{
update_input_key_state
(
input
->
desktop
,
input
->
keystate
,
msg
);
list_remove
(
&
msg
->
entry
);
free_message
(
msg
);
...
...
@@ -1980,7 +1955,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
,
0
);
release_hardware_message
(
current
->
queue
,
data
->
hw_id
,
1
);
return
1
;
}
/* nothing found, clear the hardware queue bits */
...
...
@@ -2471,7 +2446,7 @@ DECL_HANDLER(reply_message)
DECL_HANDLER
(
accept_hardware_message
)
{
if
(
current
->
queue
)
release_hardware_message
(
current
->
queue
,
req
->
hw_id
,
req
->
remove
,
req
->
new_win
);
release_hardware_message
(
current
->
queue
,
req
->
hw_id
,
req
->
remove
);
else
set_error
(
STATUS_ACCESS_DENIED
);
}
...
...
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