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
3cad302c
Commit
3cad302c
authored
Apr 04, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Use the function pointer for GetWindowDpiAwarenessContext.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2986e895
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
sysparams.c
dlls/user32/tests/sysparams.c
+6
-6
No files found.
dlls/user32/tests/sysparams.c
View file @
3cad302c
...
...
@@ -3083,7 +3083,7 @@ static void test_window_dpi(void)
hwnd
=
CreateWindowA
(
"SysParamsTestClass"
,
"Test System Parameters Application"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
0
,
0
,
GetModuleHandleA
(
0
),
NULL
);
ok
(
hwnd
!=
0
,
"failed to create window
\n
"
);
context
=
GetWindowDpiAwarenessContext
(
hwnd
);
context
=
p
GetWindowDpiAwarenessContext
(
hwnd
);
awareness
=
pGetAwarenessFromDpiAwarenessContext
(
context
);
ok
(
awareness
==
DPI_AWARENESS_UNAWARE
,
"wrong awareness %u
\n
"
,
awareness
);
DestroyWindow
(
hwnd
);
...
...
@@ -3092,7 +3092,7 @@ static void test_window_dpi(void)
hwnd
=
CreateWindowA
(
"SysParamsTestClass"
,
"Test System Parameters Application"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
0
,
0
,
GetModuleHandleA
(
0
),
NULL
);
ok
(
hwnd
!=
0
,
"failed to create window
\n
"
);
context
=
GetWindowDpiAwarenessContext
(
hwnd
);
context
=
p
GetWindowDpiAwarenessContext
(
hwnd
);
awareness
=
pGetAwarenessFromDpiAwarenessContext
(
context
);
ok
(
awareness
==
DPI_AWARENESS_SYSTEM_AWARE
,
"wrong awareness %u
\n
"
,
awareness
);
DestroyWindow
(
hwnd
);
...
...
@@ -3101,24 +3101,24 @@ static void test_window_dpi(void)
hwnd
=
CreateWindowA
(
"SysParamsTestClass"
,
"Test System Parameters Application"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
0
,
0
,
GetModuleHandleA
(
0
),
NULL
);
ok
(
hwnd
!=
0
,
"failed to create window
\n
"
);
context
=
GetWindowDpiAwarenessContext
(
hwnd
);
context
=
p
GetWindowDpiAwarenessContext
(
hwnd
);
awareness
=
pGetAwarenessFromDpiAwarenessContext
(
context
);
ok
(
awareness
==
DPI_AWARENESS_PER_MONITOR_AWARE
,
"wrong awareness %u
\n
"
,
awareness
);
DestroyWindow
(
hwnd
);
SetLastError
(
0xdeadbeef
);
context
=
GetWindowDpiAwarenessContext
(
(
HWND
)
0xdeadbeef
);
context
=
p
GetWindowDpiAwarenessContext
(
(
HWND
)
0xdeadbeef
);
ok
(
!
context
,
"got %p
\n
"
,
context
);
ok
(
GetLastError
()
==
ERROR_INVALID_WINDOW_HANDLE
,
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
context
=
GetWindowDpiAwarenessContext
(
GetDesktopWindow
()
);
context
=
p
GetWindowDpiAwarenessContext
(
GetDesktopWindow
()
);
awareness
=
pGetAwarenessFromDpiAwarenessContext
(
context
);
ok
(
awareness
==
DPI_AWARENESS_PER_MONITOR_AWARE
,
"wrong awareness %u
\n
"
,
awareness
);
pSetThreadDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT_UNAWARE
);
SetLastError
(
0xdeadbeef
);
context
=
GetWindowDpiAwarenessContext
(
GetDesktopWindow
()
);
context
=
p
GetWindowDpiAwarenessContext
(
GetDesktopWindow
()
);
awareness
=
pGetAwarenessFromDpiAwarenessContext
(
context
);
ok
(
awareness
==
DPI_AWARENESS_PER_MONITOR_AWARE
,
"wrong awareness %u
\n
"
,
awareness
);
...
...
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