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
7b56edf9
Commit
7b56edf9
authored
May 17, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Implement IShellWindows::FindWindowSW() for non-desktop windows.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
54e1559a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
14 deletions
+37
-14
shelldispatch.c
dlls/shell32/tests/shelldispatch.c
+4
-4
desktop.c
programs/explorer/desktop.c
+33
-10
No files found.
dlls/shell32/tests/shelldispatch.c
View file @
7b56edf9
...
...
@@ -1064,7 +1064,7 @@ static void test_ShellWindows(void)
VariantInit
(
&
v2
);
hr
=
IShellWindows_FindWindowSW
(
shellwindows
,
&
v
,
&
v2
,
SWC_EXPLORER
,
&
ret
,
0
,
&
disp
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
ret
,
"Got window %#x.
\n
"
,
ret
);
ok
(
!
disp
,
"Got IDispatch %p.
\n
"
,
&
disp
);
...
...
@@ -1075,15 +1075,15 @@ static void test_ShellWindows(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IShellWindows_FindWindowSW
(
shellwindows
,
&
v
,
&
v2
,
SWC_EXPLORER
,
&
ret
,
0
,
&
disp
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
ret
==
(
LONG
)(
LONG_PTR
)
hwnd
,
"Expected %p, got %#x.
\n
"
,
hwnd
,
ret
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
ret
==
(
LONG
)(
LONG_PTR
)
hwnd
,
"Expected %p, got %#x.
\n
"
,
hwnd
,
ret
);
ok
(
!
disp
,
"Got IDispatch %p.
\n
"
,
&
disp
);
hr
=
IShellWindows_Revoke
(
shellwindows
,
cookie
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IShellWindows_FindWindowSW
(
shellwindows
,
&
v
,
&
v2
,
SWC_EXPLORER
,
&
ret
,
0
,
&
disp
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
ret
,
"Got window %#x.
\n
"
,
ret
);
ok
(
!
disp
,
"Got IDispatch %p.
\n
"
,
&
disp
);
...
...
programs/explorer/desktop.c
View file @
7b56edf9
...
...
@@ -1284,26 +1284,49 @@ static HRESULT WINAPI shellwindows_OnActivated(IShellWindows *iface, LONG cookie
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
shellwindows_FindWindowSW
(
IShellWindows
*
iface
,
VARIANT
*
loc
,
static
HRESULT
WINAPI
shellwindows_FindWindowSW
(
IShellWindows
*
iface
,
VARIANT
*
loc
ation
,
VARIANT
*
root
,
int
class
,
LONG
*
hwnd
,
int
options
,
IDispatch
**
disp
)
{
TRACE
(
"%s %s 0x%x %p 0x%x %p
\n
"
,
debugstr_variant
(
loc
),
debugstr_variant
(
root
),
class
,
hwnd
,
options
,
disp
)
;
struct
shellwindows
*
sw
=
impl_from_IShellWindows
(
iface
);
unsigned
int
i
;
if
(
class
!=
SWC_DESKTOP
)
{
WARN
(
"only SWC_DESKTOP class supported.
\n
"
);
return
E_NOTIMPL
;
}
TRACE
(
"iface %p, location %p, root %p, class %#x, hwnd %p, options %#x, disp %p.
\n
"
,
iface
,
location
,
root
,
class
,
hwnd
,
options
,
disp
);
*
hwnd
=
HandleToLong
(
GetDesktopWindow
());
if
(
class
==
SWC_DESKTOP
)
{
*
hwnd
=
(
LONG
)(
LONG_PTR
)
GetDesktopWindow
();
if
(
options
&
SWFO_NEEDDISPATCH
)
{
*
disp
=
(
IDispatch
*
)
&
desktopshellbrowserwindow
.
IWebBrowser2_iface
;
*
disp
=
(
IDispatch
*
)
&
desktopshellbrowserwindow
.
IWebBrowser2_iface
;
IDispatch_AddRef
(
*
disp
);
}
return
S_OK
;
}
if
(
options
)
FIXME
(
"Ignoring options %#x.
\n
"
,
options
);
if
(
V_VT
(
location
)
!=
(
VT_ARRAY
|
VT_UI1
))
{
FIXME
(
"Unexpected variant type %s.
\n
"
,
debugstr_vt
(
V_VT
(
location
)));
return
E_NOTIMPL
;
}
EnterCriticalSection
(
&
sw
->
cs
);
for
(
i
=
0
;
i
<
sw
->
count
;
++
i
)
{
if
(
sw
->
windows
[
i
].
class
==
class
&&
ILIsEqual
(
V_ARRAY
(
location
)
->
pvData
,
sw
->
windows
[
i
].
pidl
))
{
*
hwnd
=
sw
->
windows
[
i
].
hwnd
;
LeaveCriticalSection
(
&
sw
->
cs
);
return
S_OK
;
}
}
LeaveCriticalSection
(
&
sw
->
cs
);
return
S_FALSE
;
}
static
HRESULT
WINAPI
shellwindows_OnCreated
(
IShellWindows
*
iface
,
LONG
cookie
,
IUnknown
*
punk
)
...
...
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