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
b269354f
Commit
b269354f
authored
Jun 25, 2020
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Introduce rawinput_thread_data helper.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
262ad90d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
message.c
dlls/user32/message.c
+1
-9
rawinput.c
dlls/user32/rawinput.c
+9
-0
user_private.h
dlls/user32/user_private.h
+6
-1
No files found.
dlls/user32/message.c
View file @
b269354f
...
@@ -2286,15 +2286,7 @@ static void accept_hardware_message( UINT hw_id, BOOL remove )
...
@@ -2286,15 +2286,7 @@ static void accept_hardware_message( UINT hw_id, BOOL remove )
static
BOOL
process_rawinput_message
(
MSG
*
msg
,
const
struct
hardware_msg_data
*
msg_data
)
static
BOOL
process_rawinput_message
(
MSG
*
msg
,
const
struct
hardware_msg_data
*
msg_data
)
{
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
RAWINPUT
*
rawinput
=
rawinput_thread_data
();
RAWINPUT
*
rawinput
=
thread_info
->
rawinput
;
if
(
!
rawinput
)
{
thread_info
->
rawinput
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
rawinput
)
);
if
(
!
(
rawinput
=
thread_info
->
rawinput
))
return
FALSE
;
}
if
(
!
rawinput_from_hardware_message
(
rawinput
,
msg_data
))
if
(
!
rawinput_from_hardware_message
(
rawinput
,
msg_data
))
return
FALSE
;
return
FALSE
;
...
...
dlls/user32/rawinput.c
View file @
b269354f
...
@@ -223,6 +223,15 @@ static void find_devices(void)
...
@@ -223,6 +223,15 @@ static void find_devices(void)
}
}
RAWINPUT
*
rawinput_thread_data
(
void
)
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
RAWINPUT
*
rawinput
=
thread_info
->
rawinput
;
if
(
!
rawinput
)
rawinput
=
thread_info
->
rawinput
=
HeapAlloc
(
GetProcessHeap
(),
0
,
RAWINPUT_BUFFER_SIZE
);
return
rawinput
;
}
BOOL
rawinput_from_hardware_message
(
RAWINPUT
*
rawinput
,
const
struct
hardware_msg_data
*
msg_data
)
BOOL
rawinput_from_hardware_message
(
RAWINPUT
*
rawinput
,
const
struct
hardware_msg_data
*
msg_data
)
{
{
rawinput
->
header
.
dwType
=
msg_data
->
rawinput
.
type
;
rawinput
->
header
.
dwType
=
msg_data
->
rawinput
.
type
;
...
...
dlls/user32/user_private.h
View file @
b269354f
...
@@ -169,6 +169,10 @@ struct wm_char_mapping_data
...
@@ -169,6 +169,10 @@ struct wm_char_mapping_data
MSG
get_msg
;
MSG
get_msg
;
};
};
/* on windows the buffer capacity is quite large as well, enough to */
/* hold up to 10s of 1kHz mouse rawinput events */
#define RAWINPUT_BUFFER_SIZE (512*1024)
/* this is the structure stored in TEB->Win32ClientInfo */
/* this is the structure stored in TEB->Win32ClientInfo */
/* no attempt is made to keep the layout compatible with the Windows one */
/* no attempt is made to keep the layout compatible with the Windows one */
struct
user_thread_info
struct
user_thread_info
...
@@ -192,7 +196,7 @@ struct user_thread_info
...
@@ -192,7 +196,7 @@ struct user_thread_info
struct
user_key_state_info
*
key_state
;
/* Cache of global key state */
struct
user_key_state_info
*
key_state
;
/* Cache of global key state */
HWND
top_window
;
/* Desktop window */
HWND
top_window
;
/* Desktop window */
HWND
msg_window
;
/* HWND_MESSAGE parent window */
HWND
msg_window
;
/* HWND_MESSAGE parent window */
RAWINPUT
*
rawinput
;
RAWINPUT
*
rawinput
;
/* Rawinput buffer */
};
};
C_ASSERT
(
sizeof
(
struct
user_thread_info
)
<=
sizeof
(((
TEB
*
)
0
)
->
Win32ClientInfo
)
);
C_ASSERT
(
sizeof
(
struct
user_thread_info
)
<=
sizeof
(((
TEB
*
)
0
)
->
Win32ClientInfo
)
);
...
@@ -232,6 +236,7 @@ struct tagWND;
...
@@ -232,6 +236,7 @@ struct tagWND;
struct
hardware_msg_data
;
struct
hardware_msg_data
;
extern
BOOL
rawinput_from_hardware_message
(
RAWINPUT
*
rawinput
,
const
struct
hardware_msg_data
*
msg_data
);
extern
BOOL
rawinput_from_hardware_message
(
RAWINPUT
*
rawinput
,
const
struct
hardware_msg_data
*
msg_data
);
extern
RAWINPUT
*
rawinput_thread_data
(
void
);
extern
void
CLIPBOARD_ReleaseOwner
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
CLIPBOARD_ReleaseOwner
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
BOOL
FOCUS_MouseActivate
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
BOOL
FOCUS_MouseActivate
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
...
...
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