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
ee875f36
Commit
ee875f36
authored
Nov 29, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Don't overwrite custom UI handler in SetClientSite.
parent
0863625b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
oleobj.c
dlls/mshtml/oleobj.c
+19
-15
No files found.
dlls/mshtml/oleobj.c
View file @
ee875f36
...
...
@@ -94,7 +94,6 @@ static void update_hostinfo(HTMLDocumentObj *This, DOCHOSTUIINFO *hostinfo)
static
HRESULT
WINAPI
OleObject_SetClientSite
(
IOleObject
*
iface
,
IOleClientSite
*
pClientSite
)
{
HTMLDocument
*
This
=
OLEOBJ_THIS
(
iface
);
IDocHostUIHandler
*
pDocHostUIHandler
=
NULL
;
IOleCommandTarget
*
cmdtrg
=
NULL
;
IOleWindow
*
ole_window
;
BOOL
hostui_setup
;
...
...
@@ -113,7 +112,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
This
->
doc_obj
->
usermode
=
UNKNOWN_USERMODE
;
}
if
(
This
->
doc_obj
->
hostui
)
{
if
(
This
->
doc_obj
->
hostui
&&
!
This
->
doc_obj
->
custom_hostui
)
{
IDocHostUIHandler_Release
(
This
->
doc_obj
->
hostui
);
This
->
doc_obj
->
hostui
=
NULL
;
}
...
...
@@ -128,17 +127,24 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
hostui_setup
=
This
->
doc_obj
->
hostui_setup
;
hres
=
IOleObject_QueryInterface
(
pClientSite
,
&
IID_IDocHostUIHandler
,
(
void
**
)
&
pDocHostUIHandler
);
if
(
SUCCEEDED
(
hres
))
{
if
(
!
This
->
doc_obj
->
hostui
)
{
IDocHostUIHandler
*
uihandler
;
This
->
doc_obj
->
custom_hostui
=
FALSE
;
hres
=
IOleObject_QueryInterface
(
pClientSite
,
&
IID_IDocHostUIHandler
,
(
void
**
)
&
uihandler
);
if
(
SUCCEEDED
(
hres
))
This
->
doc_obj
->
hostui
=
uihandler
;
}
if
(
This
->
doc_obj
->
hostui
)
{
DOCHOSTUIINFO
hostinfo
;
LPOLESTR
key_path
=
NULL
,
override_key_path
=
NULL
;
IDocHostUIHandler2
*
pDocHostUIHandler2
;
This
->
doc_obj
->
hostui
=
pDocHostUIHandler
;
IDocHostUIHandler2
*
uihandler2
;
memset
(
&
hostinfo
,
0
,
sizeof
(
DOCHOSTUIINFO
));
hostinfo
.
cbSize
=
sizeof
(
DOCHOSTUIINFO
);
hres
=
IDocHostUIHandler_GetHostInfo
(
pDocHostUIHandler
,
&
hostinfo
);
hres
=
IDocHostUIHandler_GetHostInfo
(
This
->
doc_obj
->
hostui
,
&
hostinfo
);
if
(
SUCCEEDED
(
hres
))
{
TRACE
(
"hostinfo = {%u %08x %08x %s %s}
\n
"
,
hostinfo
.
cbSize
,
hostinfo
.
dwFlags
,
hostinfo
.
dwDoubleClick
,
...
...
@@ -148,7 +154,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
}
if
(
!
hostui_setup
)
{
hres
=
IDocHostUIHandler_GetOptionKeyPath
(
pDocHostUIHandler
,
&
key_path
,
0
);
hres
=
IDocHostUIHandler_GetOptionKeyPath
(
This
->
doc_obj
->
hostui
,
&
key_path
,
0
);
if
(
hres
==
S_OK
&&
key_path
)
{
if
(
key_path
[
0
])
{
/* FIXME: use key_path */
...
...
@@ -157,10 +163,10 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
CoTaskMemFree
(
key_path
);
}
hres
=
IDocHostUIHandler_QueryInterface
(
pDocHostUIHandler
,
&
IID_IDocHostUIHandler2
,
(
void
**
)
&
pDocHostUIH
andler2
);
hres
=
IDocHostUIHandler_QueryInterface
(
This
->
doc_obj
->
hostui
,
&
IID_IDocHostUIHandler2
,
(
void
**
)
&
uih
andler2
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IDocHostUIHandler2_GetOverrideKeyPath
(
pDocHostUIH
andler2
,
&
override_key_path
,
0
);
hres
=
IDocHostUIHandler2_GetOverrideKeyPath
(
uih
andler2
,
&
override_key_path
,
0
);
if
(
hres
==
S_OK
&&
override_key_path
&&
override_key_path
[
0
])
{
if
(
override_key_path
[
0
])
{
/*FIXME: use override_key_path */
...
...
@@ -168,13 +174,11 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
}
CoTaskMemFree
(
override_key_path
);
}
IDocHostUIHandler2_Release
(
pDocHostUIH
andler2
);
IDocHostUIHandler2_Release
(
uih
andler2
);
}
This
->
doc_obj
->
hostui_setup
=
TRUE
;
}
}
else
{
This
->
doc_obj
->
hostui
=
NULL
;
}
/* Native calls here GetWindow. What is it for?
...
...
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