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
9443bde5
Commit
9443bde5
authored
Dec 19, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jan 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u/tests: Test NtUserEnableMouseInPointer syscall.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53847
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51537
parent
45e6dfc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
1 deletion
+48
-1
win32u.c
dlls/win32u/tests/win32u.c
+48
-1
No files found.
dlls/win32u/tests/win32u.c
View file @
9443bde5
...
...
@@ -24,7 +24,6 @@
#include "winbase.h"
#include "ntuser.h"
static
void
test_NtUserEnumDisplayDevices
(
void
)
{
NTSTATUS
ret
;
...
...
@@ -822,6 +821,43 @@ static void test_inter_process_child( HWND hwnd )
PostMessageA
(
hwnd
,
WM_USER
,
0
,
0
);
}
static
void
test_NtUserEnableMouseInPointer_process
(
const
char
*
arg
)
{
DWORD
enable
=
strtoul
(
arg
,
0
,
10
);
BOOL
ret
;
ret
=
NtUserEnableMouseInPointer
(
enable
);
todo_wine
ok
(
ret
,
"NtUserEnableMouseInPointer failed, error %lu
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
NtUserEnableMouseInPointer
(
!
enable
);
ok
(
!
ret
,
"NtUserEnableMouseInPointer succeeded
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"got error %lu
\n
"
,
GetLastError
()
);
ret
=
NtUserEnableMouseInPointer
(
enable
);
todo_wine
ok
(
ret
,
"NtUserEnableMouseInPointer failed, error %lu
\n
"
,
GetLastError
()
);
}
static
void
test_NtUserEnableMouseInPointer
(
char
**
argv
,
BOOL
enable
)
{
STARTUPINFOA
startup
=
{.
cb
=
sizeof
(
STARTUPINFOA
)};
PROCESS_INFORMATION
info
=
{
0
};
char
cmdline
[
MAX_PATH
*
2
];
BOOL
ret
;
sprintf
(
cmdline
,
"%s %s NtUserEnableMouseInPointer %u"
,
argv
[
0
],
argv
[
1
],
enable
);
ret
=
CreateProcessA
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
startup
,
&
info
);
ok
(
ret
,
"CreateProcessA failed, error %lu
\n
"
,
GetLastError
()
);
if
(
!
ret
)
return
;
wait_child_process
(
info
.
hProcess
);
CloseHandle
(
info
.
hThread
);
CloseHandle
(
info
.
hProcess
);
}
START_TEST
(
win32u
)
{
char
**
argv
;
...
...
@@ -837,6 +873,14 @@ START_TEST(win32u)
return
;
}
if
(
argc
>
3
&&
!
strcmp
(
argv
[
2
],
"NtUserEnableMouseInPointer"
))
{
winetest_push_context
(
"enable %s"
,
argv
[
3
]
);
test_NtUserEnableMouseInPointer_process
(
argv
[
3
]
);
winetest_pop_context
();
return
;
}
test_NtUserEnumDisplayDevices
();
test_window_props
();
test_class
();
...
...
@@ -851,4 +895,7 @@ START_TEST(win32u)
test_NtUserCloseWindowStation
();
test_NtUserDisplayConfigGetDeviceInfo
();
test_NtUserEnableMouseInPointer
(
argv
,
FALSE
);
test_NtUserEnableMouseInPointer
(
argv
,
TRUE
);
}
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