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
ea2613fe
Commit
ea2613fe
authored
Jun 20, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Make MDI get_client_info checks more strict.
parent
4d8f84cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
mdi.c
dlls/user32/mdi.c
+17
-7
No files found.
dlls/user32/mdi.c
View file @
ea2613fe
...
...
@@ -202,13 +202,15 @@ static MDICLIENTINFO *get_client_info( HWND client )
WND
*
win
=
WIN_GetPtr
(
client
);
if
(
win
)
{
if
(
win
==
WND_OTHER_PROCESS
)
if
(
win
==
WND_OTHER_PROCESS
||
win
==
WND_DESKTOP
)
{
if
(
IsWindow
(
client
))
ERR
(
"client %p belongs to other process
\n
"
,
client
);
if
(
IsWindow
(
client
))
WARN
(
"client %p belongs to other process
\n
"
,
client
);
return
NULL
;
}
if
(
win
->
cbWndExtra
<
sizeof
(
MDICLIENTINFO
))
WARN
(
"%p is not an MDI client
\n
"
,
client
);
else
ret
=
(
MDICLIENTINFO
*
)
win
->
wExtra
;
if
(
win
->
flags
&
WIN_ISMDICLIENT
)
ret
=
(
MDICLIENTINFO
*
)
win
->
wExtra
;
else
WARN
(
"%p is not an MDI client
\n
"
,
client
);
WIN_ReleasePtr
(
win
);
}
return
ret
;
...
...
@@ -1040,7 +1042,17 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
TRACE
(
"%p %04x (%s) %08lx %08lx
\n
"
,
hwnd
,
message
,
SPY_GetMsgName
(
message
,
hwnd
),
wParam
,
lParam
);
if
(
!
(
ci
=
get_client_info
(
hwnd
)))
return
0
;
if
(
!
(
ci
=
get_client_info
(
hwnd
)))
{
if
(
message
==
WM_NCCREATE
)
{
WND
*
wndPtr
=
WIN_GetPtr
(
hwnd
);
wndPtr
->
flags
|=
WIN_ISMDICLIENT
;
WIN_ReleasePtr
(
wndPtr
);
}
return
unicode
?
DefWindowProcW
(
hwnd
,
message
,
wParam
,
lParam
)
:
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
}
switch
(
message
)
{
...
...
@@ -1051,8 +1063,6 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
LPCREATESTRUCTA
cs
=
(
LPCREATESTRUCTA
)
lParam
;
WND
*
wndPtr
=
WIN_GetPtr
(
hwnd
);
wndPtr
->
flags
|=
WIN_ISMDICLIENT
;
/* Translation layer doesn't know what's in the cs->lpCreateParams
* so we have to keep track of what environment we're in. */
...
...
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