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
cf2f1421
Commit
cf2f1421
authored
Mar 14, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid returning hardware messages if they have no chance to match the
filter.
parent
c53d554b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
queue.c
server/queue.c
+20
-1
No files found.
server/queue.c
View file @
cf2f1421
...
...
@@ -38,6 +38,9 @@
#include "request.h"
#include "user.h"
#define WM_NCMOUSEFIRST WM_NCMOUSEMOVE
#define WM_NCMOUSELAST WM_NCMBUTTONDBLCLK
enum
message_kind
{
SEND_MESSAGE
,
POST_MESSAGE
};
#define NB_MSG_KINDS (POST_MESSAGE+1)
...
...
@@ -324,6 +327,21 @@ inline static int is_keyboard_msg( struct message *msg )
return
(
msg
->
msg
>=
WM_KEYFIRST
&&
msg
->
msg
<=
WM_KEYLAST
);
}
/* check whether a message filter contains at least one potential hardware message */
inline
static
int
filter_contains_hw_range
(
unsigned
int
first
,
unsigned
int
last
)
{
/* hardware message ranges are (in numerical order):
* WM_NCMOUSEFIRST .. WM_NCMOUSELAST
* WM_KEYFIRST .. WM_KEYLAST
* WM_MOUSEFIRST .. WM_MOUSELAST
*/
if
(
last
<
WM_NCMOUSEFIRST
)
return
0
;
if
(
first
>
WM_NCMOUSELAST
&&
last
<
WM_KEYFIRST
)
return
0
;
if
(
first
>
WM_KEYLAST
&&
last
<
WM_MOUSEFIRST
)
return
0
;
if
(
first
>
WM_MOUSELAST
)
return
0
;
return
1
;
}
/* get the QS_* bit corresponding to a given hardware message */
inline
static
int
get_hardware_msg_bit
(
struct
message
*
msg
)
{
...
...
@@ -1515,7 +1533,8 @@ DECL_HANDLER(get_message)
return
;
/* then check for any raw hardware message */
if
(
get_hardware_message
(
current
,
req
->
get_next_hw
,
first_hw_msg
,
get_win
,
reply
))
if
(
filter_contains_hw_range
(
req
->
get_first
,
req
->
get_last
)
&&
get_hardware_message
(
current
,
req
->
get_next_hw
,
first_hw_msg
,
get_win
,
reply
))
return
;
/* now check for WM_PAINT */
...
...
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