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
8351a45c
Commit
8351a45c
authored
Feb 24, 2024
by
Fabian Maurer
Committed by
Alexandre Julliard
Feb 27, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Sync dpi awareness changes from user32.
parent
c77d2e8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
sysparams.c
dlls/user32/sysparams.c
+2
-0
sysparams.c
dlls/win32u/sysparams.c
+9
-2
No files found.
dlls/user32/sysparams.c
View file @
8351a45c
...
...
@@ -655,6 +655,7 @@ BOOL WINAPI AreDpiAwarenessContextsEqual( DPI_AWARENESS_CONTEXT ctx1, DPI_AWAREN
/***********************************************************************
* GetAwarenessFromDpiAwarenessContext (USER32.@)
* copied into win32u, make sure to keep that in sync
*/
DPI_AWARENESS
WINAPI
GetAwarenessFromDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT
context
)
{
...
...
@@ -738,6 +739,7 @@ DPI_AWARENESS_CONTEXT WINAPI GetThreadDpiAwarenessContext(void)
/**********************************************************************
* SetThreadDpiAwarenessContext (USER32.@)
* copied into win32u, make sure to keep that in sync
*/
DPI_AWARENESS_CONTEXT
WINAPI
SetThreadDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT
context
)
{
...
...
dlls/win32u/sysparams.c
View file @
8351a45c
...
...
@@ -2187,7 +2187,7 @@ UINT get_win_monitor_dpi( HWND hwnd )
return
system_dpi
;
}
/*
see GetAwarenessFromDpiAwarenessContext
*/
/*
copied from user32 GetAwarenessFromDpiAwarenessContext, make sure to keep that in sync
*/
static
DPI_AWARENESS
get_awareness_from_dpi_awareness_context
(
DPI_AWARENESS_CONTEXT
context
)
{
switch
((
ULONG_PTR
)
context
)
...
...
@@ -2195,14 +2195,18 @@ static DPI_AWARENESS get_awareness_from_dpi_awareness_context( DPI_AWARENESS_CON
case
0x10
:
case
0x11
:
case
0x12
:
case
0x22
:
case
0x80000010
:
case
0x80000011
:
case
0x80000012
:
case
0x80000022
:
return
(
ULONG_PTR
)
context
&
3
;
case
(
ULONG_PTR
)
DPI_AWARENESS_CONTEXT_UNAWARE
:
case
(
ULONG_PTR
)
DPI_AWARENESS_CONTEXT_SYSTEM_AWARE
:
case
(
ULONG_PTR
)
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE
:
return
~
(
ULONG_PTR
)
context
;
case
(
ULONG_PTR
)
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
:
return
~
(
ULONG_PTR
)
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE
;
default:
return
DPI_AWARENESS_INVALID
;
}
...
...
@@ -2249,6 +2253,7 @@ UINT get_system_dpi(void)
/**********************************************************************
* SetThreadDpiAwarenessContext (win32u.so)
* copied from user32, make sure to keep that in sync
*/
DPI_AWARENESS_CONTEXT
WINAPI
SetThreadDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT
context
)
{
...
...
@@ -2265,7 +2270,9 @@ DPI_AWARENESS_CONTEXT WINAPI SetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT
prev
=
NtUserGetProcessDpiAwarenessContext
(
GetCurrentProcess
()
)
&
3
;
prev
|=
0x80000010
;
/* restore to process default */
}
if
(((
ULONG_PTR
)
context
&
~
(
ULONG_PTR
)
0x13
)
==
0x80000000
)
info
->
dpi_awareness
=
0
;
if
(((
ULONG_PTR
)
context
&
~
(
ULONG_PTR
)
0x33
)
==
0x80000000
)
info
->
dpi_awareness
=
0
;
else
if
(
context
==
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
||
context
==
(
DPI_AWARENESS_CONTEXT
)
0x22
)
info
->
dpi_awareness
=
0x22
;
else
info
->
dpi_awareness
=
val
|
0x10
;
return
ULongToHandle
(
prev
);
}
...
...
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