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
8f9610fd
Commit
8f9610fd
authored
Jan 26, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use get_hardware_msg_bit consistently to classify messages.
parent
4a91cf82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
28 deletions
+25
-28
queue.c
server/queue.c
+25
-28
No files found.
server/queue.c
View file @
8f9610fd
...
...
@@ -531,12 +531,6 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
}
}
/* check whether msg is a keyboard message */
static
inline
int
is_keyboard_msg
(
struct
message
*
msg
)
{
return
(
msg
->
msg
>=
WM_KEYFIRST
&&
msg
->
msg
<=
WM_KEYLAST
);
}
/* check if message is matched by the filter */
static
inline
int
check_msg_filter
(
unsigned
int
msg
,
unsigned
int
first
,
unsigned
int
last
)
{
...
...
@@ -563,7 +557,7 @@ static inline int get_hardware_msg_bit( struct message *msg )
{
if
(
msg
->
msg
==
WM_INPUT_DEVICE_CHANGE
||
msg
->
msg
==
WM_INPUT
)
return
QS_RAWINPUT
;
if
(
msg
->
msg
==
WM_MOUSEMOVE
||
msg
->
msg
==
WM_NCMOUSEMOVE
)
return
QS_MOUSEMOVE
;
if
(
is_keyboard_msg
(
msg
)
)
return
QS_KEY
;
if
(
msg
->
msg
>=
WM_KEYFIRST
&&
msg
->
msg
<=
WM_KEYLAST
)
return
QS_KEY
;
return
QS_MOUSEBUTTON
;
}
...
...
@@ -1507,24 +1501,27 @@ static user_handle_t find_hardware_message_window( struct desktop *desktop, stru
*
thread
=
NULL
;
*
msg_code
=
msg
->
msg
;
if
(
msg
->
msg
==
WM_INPUT
||
msg
->
msg
==
WM_INPUT_DEVICE_CHANGE
)
switch
(
get_hardware_msg_bit
(
msg
)
)
{
case
QS_RAWINPUT
:
if
(
!
(
win
=
msg
->
win
)
&&
input
)
win
=
input
->
focus
;
}
else
if
(
is_keyboard_msg
(
msg
))
{
break
;
case
QS_KEY
:
if
(
input
&&
!
(
win
=
input
->
focus
))
{
win
=
input
->
active
;
if
(
*
msg_code
<
WM_SYSKEYDOWN
)
*
msg_code
+=
WM_SYSKEYDOWN
-
WM_KEYDOWN
;
}
}
else
if
(
!
input
||
!
(
win
=
input
->
capture
))
/* mouse message */
{
if
(
is_window_visible
(
msg
->
win
)
&&
!
is_window_transparent
(
msg
->
win
))
win
=
msg
->
win
;
else
win
=
shallow_window_from_point
(
desktop
,
msg
->
x
,
msg
->
y
);
*
thread
=
window_thread_from_point
(
win
,
msg
->
x
,
msg
->
y
);
break
;
case
QS_MOUSEMOVE
:
case
QS_MOUSEBUTTON
:
if
(
!
input
||
!
(
win
=
input
->
capture
))
{
if
(
is_window_visible
(
msg
->
win
)
&&
!
is_window_transparent
(
msg
->
win
))
win
=
msg
->
win
;
else
win
=
shallow_window_from_point
(
desktop
,
msg
->
x
,
msg
->
y
);
*
thread
=
window_thread_from_point
(
win
,
msg
->
x
,
msg
->
y
);
}
break
;
}
if
(
!*
thread
)
...
...
@@ -1568,20 +1565,19 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
last_input_time
=
get_tick_count
();
if
(
msg
->
msg
!=
WM_MOUSEMOVE
)
always_queue
=
1
;
if
(
is_keyboard_msg
(
msg
))
switch
(
get_hardware_msg_bit
(
msg
))
{
case
QS_KEY
:
if
(
queue_hotkey_message
(
desktop
,
msg
))
return
;
if
(
desktop
->
keystate
[
VK_MENU
]
&
0x80
)
msg
->
lparam
|=
KF_ALTDOWN
<<
16
;
if
(
msg
->
wparam
==
VK_SHIFT
||
msg
->
wparam
==
VK_LSHIFT
||
msg
->
wparam
==
VK_RSHIFT
)
msg
->
lparam
&=
~
(
KF_EXTENDED
<<
16
);
}
else
if
(
msg
->
msg
!=
WM_INPUT
&&
msg
->
msg
!=
WM_INPUT_DEVICE_CHANGE
)
{
if
(
msg
->
msg
==
WM_MOUSEMOVE
)
{
prepend_cursor_history
(
msg
->
x
,
msg
->
y
,
msg
->
time
,
msg_data
->
info
);
if
(
update_desktop_cursor_pos
(
desktop
,
msg
->
x
,
msg
->
y
))
always_queue
=
1
;
}
break
;
case
QS_MOUSEMOVE
:
prepend_cursor_history
(
msg
->
x
,
msg
->
y
,
msg
->
time
,
msg_data
->
info
);
if
(
update_desktop_cursor_pos
(
desktop
,
msg
->
x
,
msg
->
y
))
always_queue
=
1
;
/* fallthrough */
case
QS_MOUSEBUTTON
:
if
(
desktop
->
keystate
[
VK_LBUTTON
]
&
0x80
)
msg
->
wparam
|=
MK_LBUTTON
;
if
(
desktop
->
keystate
[
VK_MBUTTON
]
&
0x80
)
msg
->
wparam
|=
MK_MBUTTON
;
if
(
desktop
->
keystate
[
VK_RBUTTON
]
&
0x80
)
msg
->
wparam
|=
MK_RBUTTON
;
...
...
@@ -1589,6 +1585,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
if
(
desktop
->
keystate
[
VK_CONTROL
]
&
0x80
)
msg
->
wparam
|=
MK_CONTROL
;
if
(
desktop
->
keystate
[
VK_XBUTTON1
]
&
0x80
)
msg
->
wparam
|=
MK_XBUTTON1
;
if
(
desktop
->
keystate
[
VK_XBUTTON2
]
&
0x80
)
msg
->
wparam
|=
MK_XBUTTON2
;
break
;
}
msg
->
x
=
desktop
->
cursor
.
x
;
msg
->
y
=
desktop
->
cursor
.
y
;
...
...
@@ -2186,7 +2183,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
||
msg
->
msg
==
WM_INPUT_DEVICE_CHANGE
)
&&
(
flags
&
PM_REMOVE
))
if
(
get_hardware_msg_bit
(
msg
)
==
QS_RAWINPUT
&&
(
flags
&
PM_REMOVE
))
release_hardware_message
(
current
->
queue
,
data
->
hw_id
);
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