Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
d51ee843
Commit
d51ee843
authored
24 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Added assembly wrapper for calling window procedures.
parent
a3e0cfc5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
windows/winproc.c
+44
-10
44 additions, 10 deletions
windows/winproc.c
with
44 additions
and
10 deletions
windows/winproc.c
+
44
−
10
View file @
d51ee843
...
...
@@ -118,6 +118,38 @@ BOOL WINPROC_Init(void)
}
#ifdef __i386__
/* Some window procedures modify register they shouldn't, or are not
* properly declared stdcall; so we need a small assembly wrapper to
* call them. */
extern
LRESULT
WINPROC_wrapper
(
WNDPROC
proc
,
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
);
__ASM_GLOBAL_FUNC
(
WINPROC_wrapper
,
"pushl %ebp
\n\t
"
"movl %esp,%ebp
\n\t
"
"pushl %edi
\n\t
"
"pushl %esi
\n\t
"
"pushl %ebx
\n\t
"
"pushl 24(%ebp)
\n\t
"
"pushl 20(%ebp)
\n\t
"
"pushl 16(%ebp)
\n\t
"
"pushl 12(%ebp)
\n\t
"
"movl 8(%ebp),%eax
\n\t
"
"call *%eax
\n\t
"
"leal -12(%ebp),%esp
\n\t
"
"popl %ebx
\n\t
"
"popl %esi
\n\t
"
"popl %edi
\n\t
"
"leave
\n\t
"
"ret"
);
#else
static
inline
LRESULT
WINPROC_wrapper
(
WNDPROC
proc
,
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
return
proc
(
hwnd
,
msg
,
wParam
,
lParam
);
}
#endif
/* __i386__ */
/**********************************************************************
* WINPROC_CallWndProc32
*
...
...
@@ -134,8 +166,10 @@ static LRESULT WINPROC_CallWndProc( WNDPROC proc, HWND hwnd, UINT msg,
/* To avoid any deadlocks, all the locks on the windows structures
must be suspended before the control is passed to the application */
iWndsLocks
=
WIN_SuspendWndsLock
();
retvalue
=
proc
(
hwnd
,
msg
,
wParam
,
lParam
);
retvalue
=
WINPROC_wrapper
(
proc
,
hwnd
,
msg
,
wParam
,
lParam
);
WIN_RestoreWndsLock
(
iWndsLocks
);
TRACE_
(
relay
)(
"(wndproc=%p,hwnd=%08x,msg=%s,wp=%08x,lp=%08lx) ret=%08lx
\n
"
,
proc
,
hwnd
,
SPY_GetMsgName
(
msg
),
wParam
,
lParam
,
retvalue
);
return
retvalue
;
}
...
...
@@ -1812,15 +1846,15 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
WND
*
tempWnd
=
WIN_FindWndPtr
(
hwnd
);
if
(
WIDGETS_IsControl
(
tempWnd
,
BIC32_MDICLIENT
)
)
{
*
pwparam16
=
(
HWND
)
wParam32
;
*
plparam
=
0
;
}
else
{
*
pwparam16
=
((
HWND
)
*
plparam
==
hwnd
);
*
plparam
=
MAKELPARAM
(
(
HWND16
)
LOWORD
(
*
plparam
),
(
HWND16
)
LOWORD
(
wParam32
)
);
}
*
pwparam16
=
(
HWND
)
wParam32
;
*
plparam
=
0
;
}
else
{
*
pwparam16
=
((
HWND
)
*
plparam
==
hwnd
);
*
plparam
=
MAKELPARAM
(
(
HWND16
)
LOWORD
(
*
plparam
),
(
HWND16
)
LOWORD
(
wParam32
)
);
}
WIN_ReleaseWndPtr
(
tempWnd
);
}
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment