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
f390b5b8
Commit
f390b5b8
authored
Jul 29, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Store DPI awareness in ntuser_thread_info.
parent
ed693f5b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
sysparams.c
dlls/user32/sysparams.c
+2
-2
ntuser_private.h
dlls/win32u/ntuser_private.h
+0
-1
sysparams.c
dlls/win32u/sysparams.c
+2
-2
ntuser.h
include/ntuser.h
+9
-8
No files found.
dlls/user32/sysparams.c
View file @
f390b5b8
...
...
@@ -888,7 +888,7 @@ UINT WINAPI GetDpiForSystem(void)
*/
DPI_AWARENESS_CONTEXT
WINAPI
GetThreadDpiAwarenessContext
(
void
)
{
struct
user_thread_info
*
info
=
get_user_thread_i
nfo
();
struct
ntuser_thread_info
*
info
=
NtUserGetThreadI
nfo
();
if
(
info
->
dpi_awareness
)
return
ULongToHandle
(
info
->
dpi_awareness
);
return
UlongToHandle
(
(
NtUserGetProcessDpiAwarenessContext
(
GetCurrentProcess
()
)
&
3
)
|
0x10
);
...
...
@@ -899,7 +899,7 @@ DPI_AWARENESS_CONTEXT WINAPI GetThreadDpiAwarenessContext(void)
*/
DPI_AWARENESS_CONTEXT
WINAPI
SetThreadDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT
context
)
{
struct
user_thread_info
*
info
=
get_user_thread_i
nfo
();
struct
ntuser_thread_info
*
info
=
NtUserGetThreadI
nfo
();
DPI_AWARENESS
prev
,
val
=
GetAwarenessFromDpiAwarenessContext
(
context
);
if
(
val
==
DPI_AWARENESS_INVALID
)
...
...
dlls/win32u/ntuser_private.h
View file @
f390b5b8
...
...
@@ -129,7 +129,6 @@ struct user_thread_info
WORD
hook_unicode
;
/* Is current hook unicode? */
HHOOK
hook
;
/* Current hook */
UINT
active_hooks
;
/* Bitmap of active hooks */
DPI_AWARENESS
dpi_awareness
;
/* DPI awareness */
INPUT_MESSAGE_SOURCE
msg_source
;
/* Message source for current message */
struct
received_message_info
*
receive_info
;
/* Message being currently received */
struct
wm_char_mapping_data
*
wmchar_data
;
/* Data for WM_CHAR mappings */
...
...
dlls/win32u/sysparams.c
View file @
f390b5b8
...
...
@@ -1608,7 +1608,7 @@ UINT get_win_monitor_dpi( HWND hwnd )
*/
DPI_AWARENESS
get_thread_dpi_awareness
(
void
)
{
struct
user_thread_info
*
info
=
get_user_thread_i
nfo
();
struct
ntuser_thread_info
*
info
=
NtUserGetThreadI
nfo
();
ULONG_PTR
context
=
info
->
dpi_awareness
;
if
(
!
context
)
context
=
NtUserGetProcessDpiAwarenessContext
(
NULL
);
...
...
@@ -1677,7 +1677,7 @@ static DPI_AWARENESS get_awareness_from_dpi_awareness_context( DPI_AWARENESS_CON
*/
DPI_AWARENESS_CONTEXT
WINAPI
SetThreadDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT
context
)
{
struct
user_thread_info
*
info
=
get_user_thread_i
nfo
();
struct
ntuser_thread_info
*
info
=
NtUserGetThreadI
nfo
();
DPI_AWARENESS
prev
,
val
=
get_awareness_from_dpi_awareness_context
(
context
);
if
(
val
==
DPI_AWARENESS_INVALID
)
...
...
include/ntuser.h
View file @
f390b5b8
...
...
@@ -61,14 +61,15 @@ enum
/* TEB thread info, not compatible with Windows */
struct
ntuser_thread_info
{
void
*
driver_data
;
/* driver-specific data */
DWORD
message_time
;
/* value for GetMessageTime */
DWORD
message_pos
;
/* value for GetMessagePos */
ULONG_PTR
message_extra
;
/* value for GetMessageExtraInfo */
HWND
top_window
;
/* desktop window */
HWND
msg_window
;
/* HWND_MESSAGE parent window */
HIMC
default_imc
;
/* default input context */
void
*
client_imm
;
/* client IMM thread info */
void
*
driver_data
;
/* driver-specific data */
DWORD
message_time
;
/* value for GetMessageTime */
DWORD
message_pos
;
/* value for GetMessagePos */
ULONG_PTR
message_extra
;
/* value for GetMessageExtraInfo */
HWND
top_window
;
/* desktop window */
HWND
msg_window
;
/* HWND_MESSAGE parent window */
DPI_AWARENESS
dpi_awareness
;
/* DPI awareness */
HIMC
default_imc
;
/* default input context */
void
*
client_imm
;
/* client IMM thread info */
};
static
inline
struct
ntuser_thread_info
*
NtUserGetThreadInfo
(
void
)
...
...
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