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
d3ca7db4
Commit
d3ca7db4
authored
Dec 31, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Also ignore dynamic DPI awareness changes when DPI scaling is disabled.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1bf418f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
sysparams.c
dlls/user32/sysparams.c
+1
-1
sysparams.c
dlls/user32/tests/sysparams.c
+12
-0
No files found.
dlls/user32/sysparams.c
View file @
d3ca7db4
...
...
@@ -1463,7 +1463,7 @@ void SYSPARAMS_Init(void)
if
(
!
dpi_scaling
)
{
default_awareness
=
DPI_AWARENESS_PER_MONITOR_AWARE
;
if
(
dpi_awareness
)
dpi_awareness
=
0x10
|
default_awareness
;
dpi_awareness
=
0x10
|
default_awareness
;
}
if
(
volatile_base_key
&&
dispos
==
REG_CREATED_NEW_KEY
)
/* first process, initialize entries */
...
...
dlls/user32/tests/sysparams.c
View file @
d3ca7db4
...
...
@@ -3567,6 +3567,7 @@ static void test_dpi_context(void)
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"wrong error %u
\n
"
,
GetLastError
()
);
ret
=
pSetProcessDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT_SYSTEM_AWARE
);
todo_wine
ok
(
ret
,
"got %d
\n
"
,
ret
);
ok
(
pIsProcessDPIAware
(),
"not aware
\n
"
);
real_dpi
=
pGetDpiForSystem
();
...
...
@@ -3587,9 +3588,11 @@ static void test_dpi_context(void)
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"wrong error %u
\n
"
,
GetLastError
()
);
ret
=
pGetProcessDpiAwarenessInternal
(
0
,
&
awareness
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
awareness
==
DPI_AWARENESS_SYSTEM_AWARE
,
"wrong value %d
\n
"
,
awareness
);
ret
=
pGetProcessDpiAwarenessInternal
(
GetCurrentProcess
(),
&
awareness
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
awareness
==
DPI_AWARENESS_SYSTEM_AWARE
,
"wrong value %d
\n
"
,
awareness
);
ret
=
pGetProcessDpiAwarenessInternal
(
(
HANDLE
)
0xdeadbeef
,
&
awareness
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
...
...
@@ -3598,8 +3601,10 @@ static void test_dpi_context(void)
ret
=
pIsProcessDPIAware
();
ok
(
ret
,
"got %d
\n
"
,
ret
);
context
=
pGetThreadDpiAwarenessContext
();
todo_wine
ok
(
context
==
(
DPI_AWARENESS_CONTEXT
)(
0x11
|
flags
),
"wrong context %p
\n
"
,
context
);
awareness
=
pGetAwarenessFromDpiAwarenessContext
(
context
);
todo_wine
ok
(
awareness
==
DPI_AWARENESS_SYSTEM_AWARE
,
"wrong awareness %u
\n
"
,
awareness
);
SetLastError
(
0xdeadbeef
);
context
=
pSetThreadDpiAwarenessContext
(
0
);
...
...
@@ -3610,8 +3615,10 @@ static void test_dpi_context(void)
ok
(
!
context
,
"got %p
\n
"
,
context
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"wrong error %u
\n
"
,
GetLastError
()
);
context
=
pSetThreadDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT_UNAWARE
);
todo_wine
ok
(
context
==
(
DPI_AWARENESS_CONTEXT
)(
0x80000011
|
flags
),
"wrong context %p
\n
"
,
context
);
awareness
=
pGetAwarenessFromDpiAwarenessContext
(
context
);
todo_wine
ok
(
awareness
==
DPI_AWARENESS_SYSTEM_AWARE
,
"wrong awareness %u
\n
"
,
awareness
);
dpi
=
pGetDpiForSystem
();
ok
(
dpi
==
USER_DEFAULT_SCREEN_DPI
,
"wrong dpi %u
\n
"
,
dpi
);
...
...
@@ -3648,16 +3655,21 @@ static void test_dpi_context(void)
context
=
pSetThreadDpiAwarenessContext
(
(
DPI_AWARENESS_CONTEXT
)(
0x80000010
|
flags
)
);
ok
(
context
==
(
DPI_AWARENESS_CONTEXT
)(
0x11
|
flags
),
"wrong context %p
\n
"
,
context
);
context
=
pGetThreadDpiAwarenessContext
();
todo_wine
ok
(
context
==
(
DPI_AWARENESS_CONTEXT
)(
0x11
|
flags
),
"wrong context %p
\n
"
,
context
);
context
=
pSetThreadDpiAwarenessContext
(
(
DPI_AWARENESS_CONTEXT
)(
0x80000011
|
flags
)
);
todo_wine
ok
(
context
==
(
DPI_AWARENESS_CONTEXT
)(
0x80000011
|
flags
),
"wrong context %p
\n
"
,
context
);
context
=
pGetThreadDpiAwarenessContext
();
todo_wine
ok
(
context
==
(
DPI_AWARENESS_CONTEXT
)(
0x11
|
flags
),
"wrong context %p
\n
"
,
context
);
context
=
pSetThreadDpiAwarenessContext
(
(
DPI_AWARENESS_CONTEXT
)
0x12
);
todo_wine
ok
(
context
==
(
DPI_AWARENESS_CONTEXT
)(
0x80000011
|
flags
),
"wrong context %p
\n
"
,
context
);
context
=
pSetThreadDpiAwarenessContext
(
context
);
ok
(
context
==
(
DPI_AWARENESS_CONTEXT
)(
0x12
),
"wrong context %p
\n
"
,
context
);
context
=
pGetThreadDpiAwarenessContext
();
todo_wine
ok
(
context
==
(
DPI_AWARENESS_CONTEXT
)(
0x11
|
flags
),
"wrong context %p
\n
"
,
context
);
for
(
i
=
0
;
i
<
0x100
;
i
++
)
{
...
...
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