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
97fa9db4
Commit
97fa9db4
authored
Nov 08, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move NtUserSetProp implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
89530400
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
14 deletions
+60
-14
property.c
dlls/user32/property.c
+2
-13
syscall.c
dlls/win32u/syscall.c
+1
-0
win32u.c
dlls/win32u/tests/win32u.c
+21
-0
win32u.spec
dlls/win32u/win32u.spec
+1
-1
window.c
dlls/win32u/window.c
+22
-0
syscall.h
dlls/wow64win/syscall.h
+1
-0
user.c
dlls/wow64win/user.c
+9
-0
ntuser.h
include/ntuser.h
+3
-0
No files found.
dlls/user32/property.c
View file @
97fa9db4
...
...
@@ -24,7 +24,7 @@
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "
win
user.h"
#include "
nt
user.h"
#include "wine/server.h"
/* size of buffer needed to store an atom string */
...
...
@@ -158,18 +158,7 @@ BOOL WINAPI SetPropA( HWND hwnd, LPCSTR str, HANDLE handle )
*/
BOOL
WINAPI
SetPropW
(
HWND
hwnd
,
LPCWSTR
str
,
HANDLE
handle
)
{
BOOL
ret
;
SERVER_START_REQ
(
set_window_property
)
{
req
->
window
=
wine_server_user_handle
(
hwnd
);
req
->
data
=
(
ULONG_PTR
)
handle
;
if
(
IS_INTRESOURCE
(
str
))
req
->
atom
=
LOWORD
(
str
);
else
wine_server_add_data
(
req
,
str
,
lstrlenW
(
str
)
*
sizeof
(
WCHAR
)
);
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
return
ret
;
return
NtUserSetProp
(
hwnd
,
str
,
handle
);
}
...
...
dlls/win32u/syscall.c
View file @
97fa9db4
...
...
@@ -114,6 +114,7 @@ static void * const syscalls[] =
NtUserOpenWindowStation
,
NtUserSetObjectInformation
,
NtUserSetProcessWindowStation
,
NtUserSetProp
,
NtUserSetThreadDesktop
,
};
...
...
dlls/win32u/tests/win32u.c
View file @
97fa9db4
...
...
@@ -32,6 +32,26 @@ static void test_NtUserCloseWindowStation(void)
"NtUserCloseWindowStation returned %x %u
\n
"
,
ret
,
GetLastError
()
);
}
static
void
test_window_props
(
void
)
{
HANDLE
prop
;
ATOM
atom
;
HWND
hwnd
;
BOOL
ret
;
hwnd
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_POPUP
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
NULL
);
atom
=
GlobalAddAtomW
(
L"test"
);
ret
=
NtUserSetProp
(
hwnd
,
UlongToPtr
(
atom
),
UlongToHandle
(
0xdeadbeef
)
);
ok
(
ret
,
"NtUserSetProp failed: %u
\n
"
,
GetLastError
()
);
prop
=
GetPropW
(
hwnd
,
L"test"
);
ok
(
prop
==
UlongToHandle
(
0xdeadbeef
),
"prop = %p
\n
"
,
prop
);
GlobalDeleteAtom
(
atom
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
win32u
)
{
...
...
@@ -39,4 +59,5 @@ START_TEST(win32u)
GetDesktopWindow
();
test_NtUserCloseWindowStation
();
test_window_props
();
}
dlls/win32u/win32u.spec
View file @
97fa9db4
...
...
@@ -1222,7 +1222,7 @@
@ stub NtUserSetProcessRestrictionExemption
@ stub NtUserSetProcessUIAccessZorder
@ stdcall -syscall NtUserSetProcessWindowStation(long)
@ st
ub NtUserSetProp
@ st
dcall -syscall NtUserSetProp(long wstr ptr)
@ stub NtUserSetScrollInfo
@ stub NtUserSetSensorPresence
@ stub NtUserSetSharedWindowData
...
...
dlls/win32u/window.c
View file @
97fa9db4
...
...
@@ -28,6 +28,28 @@
/*****************************************************************************
* NtUserSetProp (win32u.@)
*
* NOTE Native allows only ATOMs as the second argument. We allow strings
* to save extra server call in SetPropW.
*/
BOOL
WINAPI
NtUserSetProp
(
HWND
hwnd
,
const
WCHAR
*
str
,
HANDLE
handle
)
{
BOOL
ret
;
SERVER_START_REQ
(
set_window_property
)
{
req
->
window
=
wine_server_user_handle
(
hwnd
);
req
->
data
=
(
ULONG_PTR
)
handle
;
if
(
IS_INTRESOURCE
(
str
))
req
->
atom
=
LOWORD
(
str
);
else
wine_server_add_data
(
req
,
str
,
lstrlenW
(
str
)
*
sizeof
(
WCHAR
)
);
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
return
ret
;
}
/*****************************************************************************
* NtUserGetLayeredWindowAttributes (win32u.@)
*/
BOOL
WINAPI
NtUserGetLayeredWindowAttributes
(
HWND
hwnd
,
COLORREF
*
key
,
BYTE
*
alpha
,
DWORD
*
flags
)
...
...
dlls/wow64win/syscall.h
View file @
97fa9db4
...
...
@@ -101,6 +101,7 @@
SYSCALL_ENTRY( NtUserOpenWindowStation ) \
SYSCALL_ENTRY( NtUserSetObjectInformation ) \
SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserSetProp ) \
SYSCALL_ENTRY( NtUserSetThreadDesktop )
#endif
/* __WOW64WIN_SYSCALL_H */
dlls/wow64win/user.c
View file @
97fa9db4
...
...
@@ -156,6 +156,15 @@ NTSTATUS WINAPI wow64_NtUserSetObjectInformation( UINT *args )
return
NtUserSetObjectInformation
(
handle
,
index
,
info
,
len
);
}
NTSTATUS
WINAPI
wow64_NtUserSetProp
(
UINT
*
args
)
{
HWND
hwnd
=
get_handle
(
&
args
);
const
WCHAR
*
str
=
get_ptr
(
&
args
);
HANDLE
handle
=
get_handle
(
&
args
);
return
NtUserSetProp
(
hwnd
,
str
,
handle
);
}
NTSTATUS
WINAPI
wow64_NtUserGetLayeredWindowAttributes
(
UINT
*
args
)
{
HWND
hwnd
=
get_handle
(
&
args
);
...
...
include/ntuser.h
View file @
97fa9db4
...
...
@@ -34,12 +34,15 @@ BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE
BOOL
WINAPI
NtUserGetObjectInformation
(
HANDLE
handle
,
INT
index
,
void
*
info
,
DWORD
len
,
DWORD
*
needed
);
HWINSTA
WINAPI
NtUserGetProcessWindowStation
(
void
);
HANDLE
WINAPI
NtUserGetProp
(
HWND
hwnd
,
const
WCHAR
*
str
);
HDESK
WINAPI
NtUserGetThreadDesktop
(
DWORD
thread
);
HWINSTA
WINAPI
NtUserOpenWindowStation
(
OBJECT_ATTRIBUTES
*
attr
,
ACCESS_MASK
access
);
BOOL
WINAPI
NtUserSetObjectInformation
(
HANDLE
handle
,
INT
index
,
void
*
info
,
DWORD
len
);
HDESK
WINAPI
NtUserOpenDesktop
(
OBJECT_ATTRIBUTES
*
attr
,
DWORD
flags
,
ACCESS_MASK
access
);
HDESK
WINAPI
NtUserOpenInputDesktop
(
DWORD
flags
,
BOOL
inherit
,
ACCESS_MASK
access
);
HANDLE
WINAPI
NtUserRemoveProp
(
HWND
hwnd
,
const
WCHAR
*
str
);
BOOL
WINAPI
NtUserSetProcessWindowStation
(
HWINSTA
handle
);
BOOL
WINAPI
NtUserSetProp
(
HWND
hwnd
,
const
WCHAR
*
str
,
HANDLE
handle
);
BOOL
WINAPI
NtUserSetThreadDesktop
(
HDESK
handle
);
#endif
/* _NTUSER_ */
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