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
f6dad197
Commit
f6dad197
authored
Dec 19, 2010
by
David Hedberg
Committed by
Alexandre Julliard
Dec 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Fix ExplorerBrowser::SetRect to work properly when passed a NULL-valued hdwp.
parent
08fe24de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
ebrowser.c
dlls/shell32/ebrowser.c
+3
-1
ebrowser.c
dlls/shell32/tests/ebrowser.c
+19
-0
No files found.
dlls/shell32/ebrowser.c
View file @
f6dad197
...
...
@@ -908,11 +908,13 @@ static HRESULT WINAPI IExplorerBrowser_fnSetRect(IExplorerBrowser *iface,
ExplorerBrowserImpl
*
This
=
(
ExplorerBrowserImpl
*
)
iface
;
TRACE
(
"%p (%p, %s)
\n
"
,
This
,
phdwp
,
wine_dbgstr_rect
(
&
rcBrowser
));
if
(
phdwp
)
if
(
phdwp
&&
*
phdwp
)
{
*
phdwp
=
DeferWindowPos
(
*
phdwp
,
This
->
hwnd_main
,
NULL
,
rcBrowser
.
left
,
rcBrowser
.
top
,
rcBrowser
.
right
-
rcBrowser
.
left
,
rcBrowser
.
bottom
-
rcBrowser
.
top
,
SWP_NOZORDER
|
SWP_NOACTIVATE
);
if
(
!*
phdwp
)
return
E_FAIL
;
}
else
{
...
...
dlls/shell32/tests/ebrowser.c
View file @
f6dad197
...
...
@@ -1076,6 +1076,7 @@ static void test_basics(void)
HWND
eb_hwnd
;
RECT
eb_rc
;
static
const
RECT
exp_rc
=
{
11
,
21
,
49
,
49
};
static
const
RECT
exp_rc2
=
{
11
,
21
,
49
,
24
};
hr
=
IShellBrowser_GetWindow
(
psb
,
&
eb_hwnd
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
...
...
@@ -1085,6 +1086,24 @@ static void test_basics(void)
ok
(
EqualRect
(
&
eb_rc
,
&
exp_rc
),
"Got rect (%d, %d) - (%d, %d)
\n
"
,
eb_rc
.
left
,
eb_rc
.
top
,
eb_rc
.
right
,
eb_rc
.
bottom
);
/* Try resizing with invalid hdwp */
rc
.
bottom
=
25
;
hdwp
=
(
HDWP
)
0xdeadbeef
;
hr
=
IExplorerBrowser_SetRect
(
peb
,
&
hdwp
,
rc
);
ok
(
hr
==
E_FAIL
,
"Got 0x%08x
\n
"
,
hr
);
GetClientRect
(
eb_hwnd
,
&
eb_rc
);
MapWindowPoints
(
eb_hwnd
,
hwnd
,
(
POINT
*
)
&
eb_rc
,
2
);
ok
(
EqualRect
(
&
eb_rc
,
&
exp_rc
),
"Got rect (%d, %d) - (%d, %d)
\n
"
,
eb_rc
.
left
,
eb_rc
.
top
,
eb_rc
.
right
,
eb_rc
.
bottom
);
hdwp
=
NULL
;
hr
=
IExplorerBrowser_SetRect
(
peb
,
&
hdwp
,
rc
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
GetClientRect
(
eb_hwnd
,
&
eb_rc
);
MapWindowPoints
(
eb_hwnd
,
hwnd
,
(
POINT
*
)
&
eb_rc
,
2
);
ok
(
EqualRect
(
&
eb_rc
,
&
exp_rc2
),
"Got rect (%d, %d) - (%d, %d)
\n
"
,
eb_rc
.
left
,
eb_rc
.
top
,
eb_rc
.
right
,
eb_rc
.
bottom
);
IShellBrowser_Release
(
psb
);
}
...
...
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