From a3b9f702f5d392f4763837b742525fc750df68a4 Mon Sep 17 00:00:00 2001 From: gongdewei Date: Fri, 6 Feb 2015 11:34:53 +0800 Subject: [PATCH 1/2] fix IE ActiveX control invalidateWindow rect --- src/ActiveXCore/FBControl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ActiveXCore/FBControl.h b/src/ActiveXCore/FBControl.h index c39dba5f..cf42ac7f 100644 --- a/src/ActiveXCore/FBControl.h +++ b/src/ActiveXCore/FBControl.h @@ -252,8 +252,10 @@ namespace FB { boost::shared_ptr > ref(boost::make_shared >(this)); m_host->ScheduleOnMainThread(ref, boost::bind(&CFBControlX::invalidateWindow, this, left, top, right, bottom)); } else { + FB::Rect pos = pluginWin->getWindowPosition(); + RECT r = { left+pos.left, top+pos.top, right+pos.left, bottom+pos.top }; if (m_spInPlaceSite) - m_spInPlaceSite->InvalidateRect(NULL, TRUE); + m_spInPlaceSite->InvalidateRect(&r, FALSE); } } From 37345c54a3a62298fea677f9c4e1b08698a670a3 Mon Sep 17 00:00:00 2001 From: gongdewei Date: Sat, 7 Feb 2015 23:02:03 +0800 Subject: [PATCH 2/2] Fixes ActiveX control invalidateWindow rect --- src/ActiveXCore/FBControl.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ActiveXCore/FBControl.h b/src/ActiveXCore/FBControl.h index cf42ac7f..263f2884 100644 --- a/src/ActiveXCore/FBControl.h +++ b/src/ActiveXCore/FBControl.h @@ -252,10 +252,15 @@ namespace FB { boost::shared_ptr > ref(boost::make_shared >(this)); m_host->ScheduleOnMainThread(ref, boost::bind(&CFBControlX::invalidateWindow, this, left, top, right, bottom)); } else { - FB::Rect pos = pluginWin->getWindowPosition(); - RECT r = { left+pos.left, top+pos.top, right+pos.left, bottom+pos.top }; - if (m_spInPlaceSite) - m_spInPlaceSite->InvalidateRect(&r, FALSE); + if (m_spInPlaceSite){ + if(pluginWin){ + FB::Rect pos = pluginWin->getWindowPosition(); + RECT r = { left+pos.left, top+pos.top, right+pos.left, bottom+pos.top }; + m_spInPlaceSite->InvalidateRect(&r, FALSE); + }else { + m_spInPlaceSite->InvalidateRect(NULL, FALSE); + } + } } }