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
7c418f14
Commit
7c418f14
authored
May 15, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move raw input thread data allocation from user32.
parent
e2d3fc7c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
18 deletions
+13
-18
rawinput.c
dlls/user32/rawinput.c
+0
-11
user_main.c
dlls/user32/user_main.c
+0
-2
user_private.h
dlls/user32/user_private.h
+0
-1
ntuser_private.h
dlls/win32u/ntuser_private.h
+0
-1
rawinput.c
dlls/win32u/rawinput.c
+12
-3
sysparams.c
dlls/win32u/sysparams.c
+1
-0
No files found.
dlls/user32/rawinput.c
View file @
7c418f14
...
@@ -351,17 +351,6 @@ BOOL rawinput_device_get_usages(HANDLE handle, USAGE *usage_page, USAGE *usage)
...
@@ -351,17 +351,6 @@ BOOL rawinput_device_get_usages(HANDLE handle, USAGE *usage_page, USAGE *usage)
}
}
struct
rawinput_thread_data
*
WINAPI
rawinput_thread_data
(
void
)
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
struct
rawinput_thread_data
*
data
=
thread_info
->
rawinput
;
if
(
data
)
return
data
;
data
=
thread_info
->
rawinput
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
RAWINPUT_BUFFER_SIZE
+
sizeof
(
struct
user_thread_info
)
);
return
data
;
}
/***********************************************************************
/***********************************************************************
* GetRawInputDeviceList (USER32.@)
* GetRawInputDeviceList (USER32.@)
*/
*/
...
...
dlls/user32/user_main.c
View file @
7c418f14
...
@@ -169,7 +169,6 @@ static const struct user_callbacks user_funcs =
...
@@ -169,7 +169,6 @@ static const struct user_callbacks user_funcs =
register_imm
,
register_imm
,
unregister_imm
,
unregister_imm
,
try_finally
,
try_finally
,
rawinput_thread_data
,
};
};
static
NTSTATUS
WINAPI
User32CopyImage
(
const
struct
copy_image_params
*
params
,
ULONG
size
)
static
NTSTATUS
WINAPI
User32CopyImage
(
const
struct
copy_image_params
*
params
,
ULONG
size
)
...
@@ -271,7 +270,6 @@ static void thread_detach(void)
...
@@ -271,7 +270,6 @@ static void thread_detach(void)
NtUserCallNoParam
(
NtUserThreadDetach
);
NtUserCallNoParam
(
NtUserThreadDetach
);
HeapFree
(
GetProcessHeap
(),
0
,
thread_info
->
wmchar_data
);
HeapFree
(
GetProcessHeap
(),
0
,
thread_info
->
wmchar_data
);
HeapFree
(
GetProcessHeap
(),
0
,
thread_info
->
rawinput
);
exiting_thread_id
=
0
;
exiting_thread_id
=
0
;
}
}
...
...
dlls/user32/user_private.h
View file @
7c418f14
...
@@ -62,7 +62,6 @@ struct tagWND;
...
@@ -62,7 +62,6 @@ struct tagWND;
struct
hardware_msg_data
;
struct
hardware_msg_data
;
extern
BOOL
rawinput_device_get_usages
(
HANDLE
handle
,
USAGE
*
usage_page
,
USAGE
*
usage
);
extern
BOOL
rawinput_device_get_usages
(
HANDLE
handle
,
USAGE
*
usage_page
,
USAGE
*
usage
);
extern
struct
rawinput_thread_data
*
WINAPI
rawinput_thread_data
(
void
);
extern
void
CDECL
rawinput_update_device_list
(
void
);
extern
void
CDECL
rawinput_update_device_list
(
void
);
extern
BOOL
post_dde_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
DWORD
dest_tid
,
extern
BOOL
post_dde_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
DWORD
dest_tid
,
...
...
dlls/win32u/ntuser_private.h
View file @
7c418f14
...
@@ -50,7 +50,6 @@ struct user_callbacks
...
@@ -50,7 +50,6 @@ struct user_callbacks
void
(
WINAPI
*
unregister_imm
)(
HWND
hwnd
);
void
(
WINAPI
*
unregister_imm
)(
HWND
hwnd
);
NTSTATUS
(
CDECL
*
try_finally
)(
NTSTATUS
(
CDECL
*
func
)(
void
*
),
void
*
arg
,
NTSTATUS
(
CDECL
*
try_finally
)(
NTSTATUS
(
CDECL
*
func
)(
void
*
),
void
*
arg
,
void
(
CALLBACK
*
finally_func
)(
BOOL
));
void
(
CALLBACK
*
finally_func
)(
BOOL
));
struct
rawinput_thread_data
*
(
WINAPI
*
get_rawinput_thread_data
)(
void
);
};
};
#define WM_SYSTIMER 0x0118
#define WM_SYSTIMER 0x0118
...
...
dlls/win32u/rawinput.c
View file @
7c418f14
...
@@ -58,6 +58,15 @@ typedef struct
...
@@ -58,6 +58,15 @@ typedef struct
}
RAWINPUT64
;
}
RAWINPUT64
;
#endif
#endif
static
struct
rawinput_thread_data
*
get_rawinput_thread_data
(
void
)
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
struct
rawinput_thread_data
*
data
=
thread_info
->
rawinput
;
if
(
data
)
return
data
;
data
=
thread_info
->
rawinput
=
calloc
(
1
,
RAWINPUT_BUFFER_SIZE
+
sizeof
(
struct
user_thread_info
)
);
return
data
;
}
static
bool
rawinput_from_hardware_message
(
RAWINPUT
*
rawinput
,
const
struct
hardware_msg_data
*
msg_data
)
static
bool
rawinput_from_hardware_message
(
RAWINPUT
*
rawinput
,
const
struct
hardware_msg_data
*
msg_data
)
{
{
SIZE_T
size
;
SIZE_T
size
;
...
@@ -223,7 +232,7 @@ UINT WINAPI NtUserGetRawInputBuffer( RAWINPUT *data, UINT *data_size, UINT heade
...
@@ -223,7 +232,7 @@ UINT WINAPI NtUserGetRawInputBuffer( RAWINPUT *data, UINT *data_size, UINT heade
return
0
;
return
0
;
}
}
if
(
!
user_callbacks
||
!
(
thread_data
=
user_callbacks
->
get_rawinput_thread_data
()))
return
~
0u
;
if
(
!
(
thread_data
=
get_rawinput_thread_data
()))
return
~
0u
;
rawinput
=
thread_data
->
buffer
;
rawinput
=
thread_data
->
buffer
;
/* first RAWINPUT block in the buffer is used for WM_INPUT message data */
/* first RAWINPUT block in the buffer is used for WM_INPUT message data */
...
@@ -286,7 +295,7 @@ UINT WINAPI NtUserGetRawInputData( HRAWINPUT rawinput, UINT command, void *data,
...
@@ -286,7 +295,7 @@ UINT WINAPI NtUserGetRawInputData( HRAWINPUT rawinput, UINT command, void *data,
TRACE
(
"rawinput %p, command %#x, data %p, data_size %p, header_size %u.
\n
"
,
TRACE
(
"rawinput %p, command %#x, data %p, data_size %p, header_size %u.
\n
"
,
rawinput
,
command
,
data
,
data_size
,
header_size
);
rawinput
,
command
,
data
,
data_size
,
header_size
);
if
(
!
user_callbacks
||
!
(
thread_data
=
user_callbacks
->
get_rawinput_thread_data
()))
if
(
!
(
thread_data
=
get_rawinput_thread_data
()))
{
{
SetLastError
(
ERROR_OUTOFMEMORY
);
SetLastError
(
ERROR_OUTOFMEMORY
);
return
~
0u
;
return
~
0u
;
...
@@ -339,7 +348,7 @@ BOOL process_rawinput_message( MSG *msg, UINT hw_id, const struct hardware_msg_d
...
@@ -339,7 +348,7 @@ BOOL process_rawinput_message( MSG *msg, UINT hw_id, const struct hardware_msg_d
{
{
struct
rawinput_thread_data
*
thread_data
;
struct
rawinput_thread_data
*
thread_data
;
if
(
!
user_callbacks
||
!
(
thread_data
=
user_callbacks
->
get_rawinput_thread_data
()))
if
(
!
(
thread_data
=
get_rawinput_thread_data
()))
return
FALSE
;
return
FALSE
;
if
(
msg
->
message
==
WM_INPUT_DEVICE_CHANGE
)
if
(
msg
->
message
==
WM_INPUT_DEVICE_CHANGE
)
...
...
dlls/win32u/sysparams.c
View file @
7c418f14
...
@@ -4689,6 +4689,7 @@ static void thread_detach(void)
...
@@ -4689,6 +4689,7 @@ static void thread_detach(void)
free
(
thread_info
->
key_state
);
free
(
thread_info
->
key_state
);
thread_info
->
key_state
=
0
;
thread_info
->
key_state
=
0
;
free
(
thread_info
->
rawinput
);
destroy_thread_windows
();
destroy_thread_windows
();
NtClose
(
thread_info
->
server_queue
);
NtClose
(
thread_info
->
server_queue
);
...
...
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