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
3ae2dc46
Commit
3ae2dc46
authored
Jun 10, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Pass the message code to get_hardware_msg_bit.
parent
f2fef431
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
queue.c
server/queue.c
+13
-13
No files found.
server/queue.c
View file @
3ae2dc46
...
@@ -574,12 +574,12 @@ static inline int filter_contains_hw_range( unsigned int first, unsigned int las
...
@@ -574,12 +574,12 @@ static inline int filter_contains_hw_range( unsigned int first, unsigned int las
}
}
/* get the QS_* bit corresponding to a given hardware message */
/* get the QS_* bit corresponding to a given hardware message */
static
inline
int
get_hardware_msg_bit
(
struct
message
*
msg
)
static
inline
int
get_hardware_msg_bit
(
unsigned
int
message
)
{
{
if
(
m
sg
->
msg
==
WM_INPUT_DEVICE_CHANGE
||
msg
->
msg
==
WM_INPUT
)
return
QS_RAWINPUT
;
if
(
m
essage
==
WM_INPUT_DEVICE_CHANGE
||
message
==
WM_INPUT
)
return
QS_RAWINPUT
;
if
(
m
sg
->
msg
==
WM_MOUSEMOVE
||
msg
->
msg
==
WM_NCMOUSEMOVE
)
return
QS_MOUSEMOVE
;
if
(
m
essage
==
WM_MOUSEMOVE
||
message
==
WM_NCMOUSEMOVE
)
return
QS_MOUSEMOVE
;
if
(
m
sg
->
msg
>=
WM_KEYFIRST
&&
msg
->
msg
<=
WM_KEYLAST
)
return
QS_KEY
;
if
(
m
essage
>=
WM_KEYFIRST
&&
message
<=
WM_KEYLAST
)
return
QS_KEY
;
if
(
m
sg
->
msg
==
WM_WINE_CLIPCURSOR
)
return
QS_RAWINPUT
;
if
(
m
essage
==
WM_WINE_CLIPCURSOR
)
return
QS_RAWINPUT
;
return
QS_MOUSEBUTTON
;
return
QS_MOUSEBUTTON
;
}
}
...
@@ -1494,10 +1494,10 @@ static void release_hardware_message( struct msg_queue *queue, unsigned int hw_i
...
@@ -1494,10 +1494,10 @@ static void release_hardware_message( struct msg_queue *queue, unsigned int hw_i
if
(
&
msg
->
entry
==
&
input
->
msg_list
)
return
;
/* not found */
if
(
&
msg
->
entry
==
&
input
->
msg_list
)
return
;
/* not found */
/* clear the queue bit for that message */
/* clear the queue bit for that message */
clr_bit
=
get_hardware_msg_bit
(
msg
);
clr_bit
=
get_hardware_msg_bit
(
msg
->
msg
);
LIST_FOR_EACH_ENTRY
(
other
,
&
input
->
msg_list
,
struct
message
,
entry
)
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
->
msg
)
==
clr_bit
)
{
{
clr_bit
=
0
;
clr_bit
=
0
;
break
;
break
;
...
@@ -1556,7 +1556,7 @@ static user_handle_t find_hardware_message_window( struct desktop *desktop, stru
...
@@ -1556,7 +1556,7 @@ static user_handle_t find_hardware_message_window( struct desktop *desktop, stru
*
thread
=
NULL
;
*
thread
=
NULL
;
*
msg_code
=
msg
->
msg
;
*
msg_code
=
msg
->
msg
;
switch
(
get_hardware_msg_bit
(
msg
))
switch
(
get_hardware_msg_bit
(
msg
->
msg
))
{
{
case
QS_RAWINPUT
:
case
QS_RAWINPUT
:
if
(
!
(
win
=
msg
->
win
)
&&
input
)
win
=
input
->
focus
;
if
(
!
(
win
=
msg
->
win
)
&&
input
)
win
=
input
->
focus
;
...
@@ -1620,7 +1620,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
...
@@ -1620,7 +1620,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
last_input_time
=
get_tick_count
();
last_input_time
=
get_tick_count
();
if
(
msg
->
msg
!=
WM_MOUSEMOVE
)
always_queue
=
1
;
if
(
msg
->
msg
!=
WM_MOUSEMOVE
)
always_queue
=
1
;
switch
(
get_hardware_msg_bit
(
msg
))
switch
(
get_hardware_msg_bit
(
msg
->
msg
))
{
{
case
QS_KEY
:
case
QS_KEY
:
if
(
queue_hotkey_message
(
desktop
,
msg
))
return
;
if
(
queue_hotkey_message
(
desktop
,
msg
))
return
;
...
@@ -1669,7 +1669,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
...
@@ -1669,7 +1669,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
{
{
msg
->
unique_id
=
0
;
/* will be set once we return it to the app */
msg
->
unique_id
=
0
;
/* will be set once we return it to the app */
list_add_tail
(
&
input
->
msg_list
,
&
msg
->
entry
);
list_add_tail
(
&
input
->
msg_list
,
&
msg
->
entry
);
set_queue_bits
(
thread
->
queue
,
get_hardware_msg_bit
(
msg
)
);
set_queue_bits
(
thread
->
queue
,
get_hardware_msg_bit
(
msg
->
msg
)
);
}
}
release_object
(
thread
);
release_object
(
thread
);
}
}
...
@@ -2195,7 +2195,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
...
@@ -2195,7 +2195,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
if
(
win_thread
->
queue
->
input
==
input
)
if
(
win_thread
->
queue
->
input
==
input
)
{
{
/* wake the other thread */
/* wake the other thread */
set_queue_bits
(
win_thread
->
queue
,
get_hardware_msg_bit
(
msg
)
);
set_queue_bits
(
win_thread
->
queue
,
get_hardware_msg_bit
(
msg
->
msg
)
);
got_one
=
1
;
got_one
=
1
;
}
}
else
else
...
@@ -2214,7 +2214,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
...
@@ -2214,7 +2214,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
* match the filter we skip it */
* match the filter we skip it */
if
(
got_one
||
!
check_hw_message_filter
(
win
,
msg_code
,
filter_win
,
first
,
last
))
if
(
got_one
||
!
check_hw_message_filter
(
win
,
msg_code
,
filter_win
,
first
,
last
))
{
{
clear_bits
&=
~
get_hardware_msg_bit
(
msg
);
clear_bits
&=
~
get_hardware_msg_bit
(
msg
->
msg
);
continue
;
continue
;
}
}
...
@@ -2238,7 +2238,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
...
@@ -2238,7 +2238,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
data
->
hw_id
=
msg
->
unique_id
;
data
->
hw_id
=
msg
->
unique_id
;
set_reply_data
(
msg
->
data
,
msg
->
data_size
);
set_reply_data
(
msg
->
data
,
msg
->
data_size
);
if
(
get_hardware_msg_bit
(
msg
)
==
QS_RAWINPUT
&&
(
flags
&
PM_REMOVE
))
if
(
get_hardware_msg_bit
(
msg
->
msg
)
==
QS_RAWINPUT
&&
(
flags
&
PM_REMOVE
))
release_hardware_message
(
current
->
queue
,
data
->
hw_id
);
release_hardware_message
(
current
->
queue
,
data
->
hw_id
);
return
1
;
return
1
;
}
}
...
...
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