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
b3fddeb8
Commit
b3fddeb8
authored
Jul 09, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use syscall interface for NtUserMsgWaitForMultipleObjectsEx.
parent
6395bf96
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
36 additions
and
58 deletions
+36
-58
user_main.c
dlls/user32/user_main.c
+0
-1
driver.c
dlls/win32u/driver.c
+2
-6
gdiobj.c
dlls/win32u/gdiobj.c
+0
-1
ntuser_private.h
dlls/win32u/ntuser_private.h
+0
-1
syscall.c
dlls/win32u/syscall.c
+1
-0
win32u.spec
dlls/win32u/win32u.spec
+1
-1
win32u_private.h
dlls/win32u/win32u_private.h
+0
-2
wrappers.c
dlls/win32u/wrappers.c
+0
-7
android.h
dlls/wineandroid.drv/android.h
+0
-2
dllmain.c
dlls/wineandroid.drv/dllmain.c
+0
-1
init.c
dlls/wineandroid.drv/init.c
+0
-3
unixlib.h
dlls/wineandroid.drv/unixlib.h
+0
-1
window.c
dlls/wineandroid.drv/window.c
+2
-2
dllmain.c
dlls/winemac.drv/dllmain.c
+0
-1
event.c
dlls/winemac.drv/event.c
+4
-4
macdrv.h
dlls/winemac.drv/macdrv.h
+0
-3
macdrv_main.c
dlls/winemac.drv/macdrv_main.c
+0
-3
unixlib.h
dlls/winemac.drv/unixlib.h
+0
-1
dllmain.c
dlls/winex11.drv/dllmain.c
+0
-1
event.c
dlls/winex11.drv/event.c
+4
-4
unixlib.h
dlls/winex11.drv/unixlib.h
+0
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-3
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+0
-9
syscall.h
dlls/wow64win/syscall.h
+1
-0
user.c
dlls/wow64win/user.c
+21
-0
No files found.
dlls/user32/user_main.c
View file @
b3fddeb8
...
...
@@ -133,7 +133,6 @@ static NTSTATUS try_finally( NTSTATUS (CDECL *func)( void *), void *arg,
static
const
struct
user_callbacks
user_funcs
=
{
NtWaitForMultipleObjects
,
try_finally
,
};
...
...
dlls/win32u/driver.c
View file @
b3fddeb8
...
...
@@ -811,12 +811,8 @@ static NTSTATUS nulldrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *
DWORD
mask
,
DWORD
flags
)
{
if
(
!
count
&&
timeout
&&
!
timeout
->
QuadPart
)
return
WAIT_TIMEOUT
;
if
(
!
user_callbacks
)
return
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
return
user_callbacks
->
pNtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
return
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
}
static
void
nulldrv_ReleaseDC
(
HWND
hwnd
,
HDC
hdc
)
...
...
dlls/win32u/gdiobj.c
View file @
b3fddeb8
...
...
@@ -1200,7 +1200,6 @@ static struct unix_funcs unix_funcs =
NtUserMapVirtualKeyEx
,
NtUserMessageCall
,
NtUserMoveWindow
,
NtUserMsgWaitForMultipleObjectsEx
,
NtUserOpenClipboard
,
NtUserPeekMessage
,
NtUserPostMessage
,
...
...
dlls/win32u/ntuser_private.h
View file @
b3fddeb8
...
...
@@ -32,7 +32,6 @@ struct hardware_msg_data;
struct
user_callbacks
{
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
NTSTATUS
(
CDECL
*
try_finally
)(
NTSTATUS
(
CDECL
*
func
)(
void
*
),
void
*
arg
,
void
(
CALLBACK
*
finally_func
)(
BOOL
));
};
...
...
dlls/win32u/syscall.c
View file @
b3fddeb8
...
...
@@ -163,6 +163,7 @@ static void * const syscalls[] =
NtUserKillTimer
,
NtUserLockWindowUpdate
,
NtUserMenuItemFromPoint
,
NtUserMsgWaitForMultipleObjectsEx
,
NtUserNotifyWinEvent
,
NtUserOpenDesktop
,
NtUserOpenInputDesktop
,
...
...
dlls/win32u/win32u.spec
View file @
b3fddeb8
...
...
@@ -1085,7 +1085,7 @@
@ stub NtUserModifyUserStartupInfoFlags
@ stub NtUserModifyWindowTouchCapability
@ stdcall NtUserMoveWindow(long long long long long long)
@ stdcall NtUserMsgWaitForMultipleObjectsEx(long ptr long long long)
@ stdcall
-syscall
NtUserMsgWaitForMultipleObjectsEx(long ptr long long long)
@ stub NtUserNavigateFocus
@ stub NtUserNotifyIMEStatus
@ stub NtUserNotifyProcessCreate
...
...
dlls/win32u/win32u_private.h
View file @
b3fddeb8
...
...
@@ -265,8 +265,6 @@ struct unix_funcs
LRESULT
(
WINAPI
*
pNtUserMessageCall
)(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
void
*
result_info
,
DWORD
type
,
BOOL
ansi
);
BOOL
(
WINAPI
*
pNtUserMoveWindow
)(
HWND
hwnd
,
INT
x
,
INT
y
,
INT
cx
,
INT
cy
,
BOOL
repaint
);
DWORD
(
WINAPI
*
pNtUserMsgWaitForMultipleObjectsEx
)(
DWORD
count
,
const
HANDLE
*
handles
,
DWORD
timeout
,
DWORD
mask
,
DWORD
flags
);
BOOL
(
WINAPI
*
pNtUserOpenClipboard
)(
HWND
hwnd
,
ULONG
unk
);
BOOL
(
WINAPI
*
pNtUserPeekMessage
)(
MSG
*
msg_out
,
HWND
hwnd
,
UINT
first
,
UINT
last
,
UINT
flags
);
BOOL
(
WINAPI
*
pNtUserPostMessage
)(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
);
...
...
dlls/win32u/wrappers.c
View file @
b3fddeb8
...
...
@@ -1110,13 +1110,6 @@ LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
return
unix_funcs
->
pNtUserMessageCall
(
hwnd
,
msg
,
wparam
,
lparam
,
result_info
,
type
,
ansi
);
}
DWORD
WINAPI
NtUserMsgWaitForMultipleObjectsEx
(
DWORD
count
,
const
HANDLE
*
handles
,
DWORD
timeout
,
DWORD
mask
,
DWORD
flags
)
{
if
(
!
unix_funcs
)
return
0
;
return
unix_funcs
->
pNtUserMsgWaitForMultipleObjectsEx
(
count
,
handles
,
timeout
,
mask
,
flags
);
}
BOOL
WINAPI
NtUserOpenClipboard
(
HWND
hwnd
,
ULONG
unk
)
{
if
(
!
unix_funcs
)
return
FALSE
;
...
...
dlls/wineandroid.drv/android.h
View file @
b3fddeb8
...
...
@@ -120,8 +120,6 @@ extern NTSTATUS android_java_init( void *arg ) DECLSPEC_HIDDEN;
extern
NTSTATUS
android_java_uninit
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
android_register_window
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
PNTAPCFUNC
register_window_callback
;
extern
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
)
DECLSPEC_HIDDEN
;
extern
unsigned
int
screen_width
DECLSPEC_HIDDEN
;
extern
unsigned
int
screen_height
DECLSPEC_HIDDEN
;
...
...
dlls/wineandroid.drv/dllmain.c
View file @
b3fddeb8
...
...
@@ -130,7 +130,6 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
return
FALSE
;
params
.
register_window_callback
=
register_window_callback
;
params
.
pNtWaitForMultipleObjects
=
NtWaitForMultipleObjects
;
if
(
__wine_unix_call
(
unix_handle
,
unix_init
,
&
params
))
return
FALSE
;
callback_table
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
;
...
...
dlls/wineandroid.drv/init.c
View file @
b3fddeb8
...
...
@@ -563,8 +563,6 @@ jobject *p_java_object = NULL;
unsigned
short
*
p_java_gdt_sel
=
NULL
;
static
NTSTATUS
CDECL
unix_call
(
enum
android_funcs
code
,
void
*
params
);
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
static
HRESULT
android_init
(
void
*
arg
)
{
...
...
@@ -611,7 +609,6 @@ static HRESULT android_init( void *arg )
#endif
}
__wine_set_user_driver
(
&
android_drv_funcs
,
WINE_GDI_DRIVER_VERSION
);
pNtWaitForMultipleObjects
=
params
->
pNtWaitForMultipleObjects
;
params
->
unix_call
=
unix_call
;
return
STATUS_SUCCESS
;
}
...
...
dlls/wineandroid.drv/unixlib.h
View file @
b3fddeb8
...
...
@@ -37,7 +37,6 @@ enum android_funcs
struct
init_params
{
PNTAPCFUNC
register_window_callback
;
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
NTSTATUS
(
CDECL
*
unix_call
)(
enum
android_funcs
code
,
void
*
params
);
};
...
...
dlls/wineandroid.drv/window.c
View file @
b3fddeb8
...
...
@@ -1212,8 +1212,8 @@ NTSTATUS ANDROID_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles
if
(
current_event
)
mask
=
0
;
if
(
process_events
(
mask
))
return
count
-
1
;
}
return
p
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
return
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
}
/**********************************************************************
...
...
dlls/winemac.drv/dllmain.c
View file @
b3fddeb8
...
...
@@ -414,7 +414,6 @@ static BOOL process_attach(void)
str
->
len
=
LoadStringW
(
macdrv_module
,
str
->
id
,
(
WCHAR
*
)
&
str
->
str
,
0
);
params
.
strings
=
strings
;
params
.
pNtWaitForMultipleObjects
=
NtWaitForMultipleObjects
;
if
(
__wine_unix_call
(
macdrv_handle
,
unix_init
,
&
params
))
return
FALSE
;
callback_table
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
;
...
...
dlls/winemac.drv/event.c
View file @
b3fddeb8
...
...
@@ -525,8 +525,8 @@ NTSTATUS macdrv_MsgWaitForMultipleObjectsEx(DWORD count, const HANDLE *handles,
if
(
!
data
)
{
if
(
!
count
&&
timeout
&&
!
timeout
->
QuadPart
)
return
WAIT_TIMEOUT
;
return
p
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
return
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
}
if
(
data
->
current_event
&&
data
->
current_event
->
type
!=
QUERY_EVENT
&&
...
...
@@ -538,8 +538,8 @@ NTSTATUS macdrv_MsgWaitForMultipleObjectsEx(DWORD count, const HANDLE *handles,
if
(
process_events
(
data
->
queue
,
event_mask
))
ret
=
count
-
1
;
else
if
(
count
||
!
timeout
||
timeout
->
QuadPart
)
{
ret
=
p
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
ret
=
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
if
(
ret
==
count
-
1
)
process_events
(
data
->
queue
,
event_mask
);
}
else
ret
=
WAIT_TIMEOUT
;
...
...
dlls/winemac.drv/macdrv.h
View file @
b3fddeb8
...
...
@@ -42,9 +42,6 @@ extern BOOL allow_set_gamma DECLSPEC_HIDDEN;
extern
BOOL
allow_software_rendering
DECLSPEC_HIDDEN
;
extern
BOOL
disable_window_decorations
DECLSPEC_HIDDEN
;
extern
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
)
DECLSPEC_HIDDEN
;
extern
const
char
*
debugstr_cf
(
CFTypeRef
t
)
DECLSPEC_HIDDEN
;
static
inline
CGRect
cgrect_from_rect
(
RECT
rect
)
...
...
dlls/winemac.drv/macdrv_main.c
View file @
b3fddeb8
...
...
@@ -69,8 +69,6 @@ int enable_app_nap = FALSE;
CFDictionaryRef
localized_strings
;
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
/**************************************************************************
* debugstr_cf
...
...
@@ -461,7 +459,6 @@ static NTSTATUS macdrv_init(void *arg)
init_user_driver
();
macdrv_init_display_devices
(
FALSE
);
pNtWaitForMultipleObjects
=
params
->
pNtWaitForMultipleObjects
;
params
->
unix_call
=
unix_call
;
return
STATUS_SUCCESS
;
}
...
...
dlls/winemac.drv/unixlib.h
View file @
b3fddeb8
...
...
@@ -83,7 +83,6 @@ struct localized_string
struct
init_params
{
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
struct
localized_string
*
strings
;
NTSTATUS
(
CDECL
*
unix_call
)(
enum
macdrv_funcs
code
,
void
*
params
);
};
...
...
dlls/winex11.drv/dllmain.c
View file @
b3fddeb8
...
...
@@ -67,7 +67,6 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved )
void
**
callback_table
;
struct
init_params
params
=
{
NtWaitForMultipleObjects
,
foreign_window_proc
,
};
...
...
dlls/winex11.drv/event.c
View file @
b3fddeb8
...
...
@@ -483,8 +483,8 @@ NTSTATUS X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
if
(
!
data
)
{
if
(
!
count
&&
timeout
&&
!
timeout
->
QuadPart
)
return
WAIT_TIMEOUT
;
return
p
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
return
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
}
if
(
data
->
current_event
)
mask
=
0
;
/* don't process nested events */
...
...
@@ -492,8 +492,8 @@ NTSTATUS X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
if
(
process_events
(
data
->
display
,
filter_event
,
mask
))
ret
=
count
-
1
;
else
if
(
count
||
!
timeout
||
timeout
->
QuadPart
)
{
ret
=
p
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
ret
=
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
if
(
ret
==
count
-
1
)
process_events
(
data
->
display
,
filter_event
,
mask
);
}
else
ret
=
WAIT_TIMEOUT
;
...
...
dlls/winex11.drv/unixlib.h
View file @
b3fddeb8
...
...
@@ -50,7 +50,6 @@ struct create_desktop_params
/* x11drv_init params */
struct
init_params
{
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
WNDPROC
foreign_window_proc
;
BOOL
show_systray
;
NTSTATUS
(
CDECL
*
unix_call
)(
enum
x11drv_funcs
code
,
void
*
params
);
...
...
dlls/winex11.drv/x11drv.h
View file @
b3fddeb8
...
...
@@ -446,9 +446,6 @@ extern char *process_name DECLSPEC_HIDDEN;
extern
Display
*
clipboard_display
DECLSPEC_HIDDEN
;
extern
WNDPROC
client_foreign_window_proc
;
extern
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
)
DECLSPEC_HIDDEN
;
/* atoms */
enum
x11drv_atoms
...
...
dlls/winex11.drv/x11drv_main.c
View file @
b3fddeb8
...
...
@@ -220,14 +220,6 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"text/uri-list"
};
/* We use use pointer to call NtWaitForMultipleObjects to make it go through
* syscall dispatcher. We need that because win32u bypasses syscall thunks and
* if we called NtWaitForMultipleObjects directly, it wouldn't be able to handle
* user APCs. This will be removed as soon as we may use syscall interface
* for NtUserMsgWaitForMultipleObjectsEx. */
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
static
NTSTATUS
CDECL
unix_call
(
enum
x11drv_funcs
code
,
void
*
params
);
/***********************************************************************
...
...
@@ -686,7 +678,6 @@ static NTSTATUS x11drv_init( void *arg )
if
(
!
XInitThreads
())
ERR
(
"XInitThreads failed, trouble ahead
\n
"
);
if
(
!
(
display
=
XOpenDisplay
(
NULL
)))
return
STATUS_UNSUCCESSFUL
;
pNtWaitForMultipleObjects
=
params
->
pNtWaitForMultipleObjects
;
client_foreign_window_proc
=
params
->
foreign_window_proc
;
fcntl
(
ConnectionNumber
(
display
),
F_SETFD
,
1
);
/* set close on exec flag */
...
...
dlls/wow64win/syscall.h
View file @
b3fddeb8
...
...
@@ -150,6 +150,7 @@
SYSCALL_ENTRY( NtUserKillTimer ) \
SYSCALL_ENTRY( NtUserLockWindowUpdate ) \
SYSCALL_ENTRY( NtUserMenuItemFromPoint ) \
SYSCALL_ENTRY( NtUserMsgWaitForMultipleObjectsEx ) \
SYSCALL_ENTRY( NtUserNotifyWinEvent ) \
SYSCALL_ENTRY( NtUserOpenDesktop ) \
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
...
...
dlls/wow64win/user.c
View file @
b3fddeb8
...
...
@@ -836,6 +836,27 @@ NTSTATUS WINAPI wow64_NtUserMenuItemFromPoint( UINT *args )
return
NtUserMenuItemFromPoint
(
hwnd
,
handle
,
x
,
y
);
}
NTSTATUS
WINAPI
wow64_NtUserMsgWaitForMultipleObjectsEx
(
UINT
*
args
)
{
DWORD
count
=
get_ulong
(
&
args
);
const
ULONG
*
handles32
=
get_ptr
(
&
args
);
DWORD
timeout
=
get_ulong
(
&
args
);
DWORD
mask
=
get_ulong
(
&
args
);
DWORD
flags
=
get_ulong
(
&
args
);
HANDLE
handles
[
MAXIMUM_WAIT_OBJECTS
];
unsigned
int
i
;
if
(
count
>
ARRAYSIZE
(
handles
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
WAIT_FAILED
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
handles
[
i
]
=
UlongToHandle
(
handles32
[
i
]
);
return
NtUserMsgWaitForMultipleObjectsEx
(
count
,
handles
,
timeout
,
mask
,
flags
);
}
NTSTATUS
WINAPI
wow64_NtUserNotifyWinEvent
(
UINT
*
args
)
{
DWORD
event
=
get_ulong
(
&
args
);
...
...
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