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
b33c5f16
Commit
b33c5f16
authored
Dec 24, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add a WoW wrapper for message waiting to allow releasing the Win16 lock in the 16-bit code.
parent
2ea73fd7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
17 deletions
+28
-17
controls.h
dlls/user32/controls.h
+2
-0
message.c
dlls/user32/message.c
+4
-17
msg16.c
dlls/user32/msg16.c
+15
-0
winproc.c
dlls/user32/winproc.c
+7
-0
No files found.
dlls/user32/controls.h
View file @
b33c5f16
...
...
@@ -96,6 +96,7 @@ struct wow_handlers16
LRESULT
(
*
mdiclient_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
scrollbar_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
static_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
DWORD
(
*
wait_message
)(
DWORD
,
const
HANDLE
*
,
DWORD
,
DWORD
,
DWORD
);
HWND
(
*
create_window
)(
CREATESTRUCTW
*
,
LPCWSTR
,
HINSTANCE
,
BOOL
);
LRESULT
(
*
call_window_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
LRESULT
*
,
void
*
);
LRESULT
(
*
call_dialog_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
LRESULT
*
,
void
*
);
...
...
@@ -114,6 +115,7 @@ struct wow_handlers32
LRESULT
(
*
mdiclient_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
scrollbar_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
static_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
DWORD
(
*
wait_message
)(
DWORD
,
const
HANDLE
*
,
DWORD
,
DWORD
,
DWORD
);
HWND
(
*
create_window
)(
CREATESTRUCTW
*
,
LPCWSTR
,
HINSTANCE
,
BOOL
);
HWND
(
*
get_win_handle
)(
HWND
);
WNDPROC
(
*
alloc_winproc
)(
WNDPROC
,
BOOL
);
...
...
dlls/user32/message.c
View file @
b33c5f16
...
...
@@ -2266,7 +2266,6 @@ static void wait_message_reply( UINT flags )
for
(;;)
{
unsigned
int
wake_bits
=
0
;
DWORD
dwlc
,
res
;
SERVER_START_REQ
(
set_queue_mask
)
{
...
...
@@ -2286,12 +2285,7 @@ static void wait_message_reply( UINT flags )
continue
;
}
/* now wait for it */
ReleaseThunkLock
(
&
dwlc
);
res
=
USER_Driver
->
pMsgWaitForMultipleObjectsEx
(
1
,
&
server_queue
,
INFINITE
,
QS_SENDMESSAGE
,
0
);
if
(
dwlc
)
RestoreThunkLock
(
dwlc
);
wow_handlers
.
wait_message
(
1
,
&
server_queue
,
INFINITE
,
QS_SENDMESSAGE
,
0
);
}
}
...
...
@@ -2955,11 +2949,7 @@ BOOL WINAPI GetMessageW( MSG *msg, HWND hwnd, UINT first, UINT last )
while
(
!
peek_message
(
msg
,
hwnd
,
first
,
last
,
PM_REMOVE
|
(
mask
<<
16
),
mask
))
{
DWORD
dwlc
;
ReleaseThunkLock
(
&
dwlc
);
USER_Driver
->
pMsgWaitForMultipleObjectsEx
(
1
,
&
server_queue
,
INFINITE
,
mask
,
0
);
if
(
dwlc
)
RestoreThunkLock
(
dwlc
);
wow_handlers
.
wait_message
(
1
,
&
server_queue
,
INFINITE
,
mask
,
0
);
}
return
(
msg
->
message
!=
WM_QUIT
);
...
...
@@ -3269,7 +3259,7 @@ DWORD WINAPI MsgWaitForMultipleObjectsEx( DWORD count, CONST HANDLE *pHandles,
DWORD
timeout
,
DWORD
mask
,
DWORD
flags
)
{
HANDLE
handles
[
MAXIMUM_WAIT_OBJECTS
];
DWORD
i
,
ret
,
lock
;
DWORD
i
;
if
(
count
>
MAXIMUM_WAIT_OBJECTS
-
1
)
{
...
...
@@ -3291,10 +3281,7 @@ DWORD WINAPI MsgWaitForMultipleObjectsEx( DWORD count, CONST HANDLE *pHandles,
for
(
i
=
0
;
i
<
count
;
i
++
)
handles
[
i
]
=
pHandles
[
i
];
handles
[
count
]
=
get_server_queue_handle
();
ReleaseThunkLock
(
&
lock
);
ret
=
USER_Driver
->
pMsgWaitForMultipleObjectsEx
(
count
+
1
,
handles
,
timeout
,
mask
,
flags
);
if
(
lock
)
RestoreThunkLock
(
lock
);
return
ret
;
return
wow_handlers
.
wait_message
(
count
+
1
,
handles
,
timeout
,
mask
,
flags
);
}
...
...
dlls/user32/msg16.c
View file @
b33c5f16
...
...
@@ -2569,6 +2569,20 @@ static LRESULT static_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
/***********************************************************************
* wait_message16
*/
static
DWORD
wait_message16
(
DWORD
count
,
CONST
HANDLE
*
handles
,
DWORD
timeout
,
DWORD
mask
,
DWORD
flags
)
{
DWORD
lock
,
ret
;
ReleaseThunkLock
(
&
lock
);
ret
=
wow_handlers32
.
wait_message
(
count
,
handles
,
timeout
,
mask
,
flags
);
RestoreThunkLock
(
lock
);
return
ret
;
}
/***********************************************************************
* create_window16
*/
HWND
create_window16
(
CREATESTRUCTW
*
cs
,
LPCWSTR
className
,
HINSTANCE
instance
,
BOOL
unicode
)
...
...
@@ -2619,6 +2633,7 @@ void register_wow_handlers(void)
mdiclient_proc16
,
scrollbar_proc16
,
static_proc16
,
wait_message16
,
create_window16
,
call_window_proc_Ato16
,
call_dialog_proc_Ato16
,
...
...
dlls/user32/winproc.c
View file @
b33c5f16
...
...
@@ -1121,6 +1121,11 @@ static LRESULT WINAPI StaticWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return
wow_handlers
.
static_proc
(
hwnd
,
msg
,
wParam
,
lParam
,
TRUE
);
}
static
DWORD
wait_message
(
DWORD
count
,
CONST
HANDLE
*
handles
,
DWORD
timeout
,
DWORD
mask
,
DWORD
flags
)
{
return
USER_Driver
->
pMsgWaitForMultipleObjectsEx
(
count
,
handles
,
timeout
,
mask
,
flags
);
}
static
HICON
alloc_icon_handle
(
unsigned
int
size
)
{
struct
user_object
*
obj
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
obj
)
+
size
);
...
...
@@ -1167,6 +1172,7 @@ void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new, struct wo
orig
->
mdiclient_proc
=
MDIClientWndProc_common
;
orig
->
scrollbar_proc
=
ScrollBarWndProc_common
;
orig
->
static_proc
=
StaticWndProc_common
;
orig
->
wait_message
=
wait_message
;
orig
->
create_window
=
WIN_CreateWindowEx
;
orig
->
get_win_handle
=
WIN_GetFullHandle
;
orig
->
alloc_winproc
=
WINPROC_AllocProc
;
...
...
@@ -1185,6 +1191,7 @@ struct wow_handlers16 wow_handlers =
MDIClientWndProc_common
,
ScrollBarWndProc_common
,
StaticWndProc_common
,
wait_message
,
WIN_CreateWindowEx
,
NULL
,
/* call_window_proc */
NULL
,
/* call_dialog_proc */
...
...
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