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
47f796c6
Commit
47f796c6
authored
Jan 18, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Deactivate document in SetClientSite if ClientSite is NULL.
Fix ref counting.
parent
23ead2b1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
4 deletions
+67
-4
client.c
dlls/shdocvw/client.c
+1
-0
dochost.c
dlls/shdocvw/dochost.c
+52
-0
events.c
dlls/shdocvw/events.c
+1
-0
oleobject.c
dlls/shdocvw/oleobject.c
+12
-4
shdocvw.h
dlls/shdocvw/shdocvw.h
+1
-0
No files found.
dlls/shdocvw/client.c
View file @
47f796c6
...
...
@@ -204,6 +204,7 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface,
TRACE
(
"(%p)->(%p %p %p %p %p)
\n
"
,
This
,
ppFrame
,
ppDoc
,
lprcPosRect
,
lprcClipRect
,
lpFrameInfo
);
IOleInPlaceFrame_AddRef
(
INPLACEFRAME
(
This
));
*
ppFrame
=
INPLACEFRAME
(
This
);
*
ppDoc
=
NULL
;
...
...
dlls/shdocvw/dochost.c
View file @
47f796c6
...
...
@@ -154,6 +154,58 @@ void create_doc_view_hwnd(WebBrowser *This)
NULL
,
shdocvw_hinstance
,
This
);
}
void
deactivate_document
(
WebBrowser
*
This
)
{
IOleInPlaceObjectWindowless
*
winobj
;
IOleObject
*
oleobj
=
NULL
;
IHlinkTarget
*
hlink
=
NULL
;
HRESULT
hres
;
if
(
This
->
view
)
IOleDocumentView_UIActivate
(
This
->
view
,
FALSE
);
hres
=
IUnknown_QueryInterface
(
This
->
client
,
&
IID_IOleInPlaceObjectWindowless
,
(
void
**
)
&
winobj
);
if
(
SUCCEEDED
(
hres
))
{
IOleInPlaceObjectWindowless_InPlaceDeactivate
(
winobj
);
IOleInPlaceObjectWindowless_Release
(
winobj
);
}
if
(
This
->
view
)
{
IOleDocumentView_Show
(
This
->
view
,
FALSE
);
IOleDocumentView_CloseView
(
This
->
view
,
0
);
IOleDocumentView_SetInPlaceSite
(
This
->
view
,
NULL
);
IOleDocumentView_Release
(
This
->
view
);
This
->
view
=
NULL
;
}
hres
=
IUnknown_QueryInterface
(
This
->
document
,
&
IID_IOleObject
,
(
void
**
)
&
oleobj
);
if
(
SUCCEEDED
(
hres
))
IOleObject_Close
(
oleobj
,
OLECLOSE_NOSAVE
);
hres
=
IUnknown_QueryInterface
(
This
->
document
,
&
IID_IHlinkTarget
,
(
void
**
)
&
hlink
);
if
(
SUCCEEDED
(
hres
))
{
IHlinkTarget_SetBrowseContext
(
hlink
,
NULL
);
IHlinkTarget_Release
(
hlink
);
}
if
(
oleobj
)
{
IOleClientSite
*
client_site
=
NULL
;
IOleObject_GetClientSite
(
oleobj
,
&
client_site
);
if
(
client_site
)
{
if
(
client_site
==
CLIENTSITE
(
This
))
IOleObject_SetClientSite
(
oleobj
,
NULL
);
IOleClientSite_Release
(
client_site
);
}
IOleObject_Release
(
oleobj
);
}
IUnknown_Release
(
This
->
document
);
This
->
document
=
NULL
;
}
#define DOCHOSTUI_THIS(iface) DEFINE_THIS(WebBrowser, DocHostUIHandler, iface)
static
HRESULT
WINAPI
DocHostUIHandler_QueryInterface
(
IDocHostUIHandler2
*
iface
,
...
...
dlls/shdocvw/events.c
View file @
47f796c6
...
...
@@ -177,6 +177,7 @@ static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoi
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppCPC
);
*
ppCPC
=
CONPTCONT
(
This
->
webbrowser
);
IConnectionPointContainer_AddRef
(
CONPTCONT
(
This
->
webbrowser
));
return
S_OK
;
}
...
...
dlls/shdocvw/oleobject.c
View file @
47f796c6
...
...
@@ -130,18 +130,26 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE
if
(
This
->
client
==
pClientSite
)
return
S_OK
;
if
(
This
->
doc_view_hwnd
)
if
(
This
->
doc_view_hwnd
)
{
DestroyWindow
(
This
->
doc_view_hwnd
);
if
(
This
->
shell_embedding_hwnd
)
This
->
doc_view_hwnd
=
NULL
;
}
if
(
This
->
shell_embedding_hwnd
)
{
DestroyWindow
(
This
->
shell_embedding_hwnd
);
This
->
shell_embedding_hwnd
=
NULL
;
}
if
(
This
->
client
)
IOleClientSite_Release
(
This
->
client
);
This
->
client
=
pClientSite
;
if
(
!
pClientSite
)
if
(
!
pClientSite
)
{
if
(
This
->
document
)
deactivate_document
(
This
);
This
->
client
=
NULL
;
return
S_OK
;
}
This
->
client
=
pClientSite
;
IOleClientSite_AddRef
(
pClientSite
);
create_shell_embedding_hwnd
(
This
);
...
...
dlls/shdocvw/shdocvw.h
View file @
47f796c6
...
...
@@ -158,6 +158,7 @@ void WebBrowser_ClientSite_Destroy(WebBrowser*);
HRESULT
WebBrowser_Create
(
IUnknown
*
,
REFIID
,
void
**
);
void
create_doc_view_hwnd
(
WebBrowser
*
This
);
void
deactivate_document
(
WebBrowser
*
);
void
call_sink
(
ConnectionPoint
*
,
DISPID
,
DISPPARAMS
*
);
#define WB_WM_NAVIGATE2 (WM_USER+100)
...
...
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