[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-video-cvs
Subject: [Video-cvs]
From: milko () helixcommunity ! org
Date: 2007-06-08 8:24:07
Message-ID: 200706080825.l588PHfp008526 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/video/sitelib/platform/mac
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv9021/sitelib/platform/mac
Modified Files:
macsite.cpp macsurf.cpp
Log Message:
Added support site damage notification and Blt eventing to a
delegated site.
Also added overlay on/off auto selection based on external blending with
video.
Index: macsite.cpp
===================================================================
RCS file: /cvsroot/video/sitelib/platform/mac/macsite.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- macsite.cpp 5 Jun 2007 19:15:30 -0000 1.29
+++ macsite.cpp 8 Jun 2007 08:24:04 -0000 1.30
@@ -180,7 +180,7 @@
::DisposeRgn( soonToBeSectedRgnCopy );
}
- ::OffsetRgn(clipRgn, horizOffset, vertOffset);
+ ::OffsetRgn(clipRgn, horizOffset - portBounds.left, vertOffset - \
portBounds.top);
::SetOrigin(horizOffset, vertOffset);
::SetClip(clipRgn);
@@ -275,6 +275,7 @@
, m_fStretchMultiple(0.0)
, m_RememberMacPort(nil)
, m_bInternalResizeOnFullscreen(FALSE)
+ , m_bUseOverlay(TRUE)
, m_pMacSiteRedrawCallback(NULL)
#ifdef THREADS_SUPPORTED
@@ -291,6 +292,8 @@
, m_pClientEngine(NULL)
#endif
{
+ m_ulLastSurfaceDamageTick = HX_GET_BETTERTICKCOUNT() - \
MIN_OVERLAY_RETRY_DELAY_AFTER_DAMAGE; +
m_MostRecentConvertedMouseLoc.x = 0;
m_MostRecentConvertedMouseLoc.y = 0;
@@ -801,11 +804,35 @@
// if we switch out while in full-screen, unfortunately we need
// to turn off full-screen.
- if (macEvent->what == nullEvent)
+ if (pEvent->event == HX_SURFACE_DAMAGED)
+ {
+ /*** MBO - Disable restoring of overlay after damage
+ m_ulLastSurfaceDamageTick = HX_GET_BETTERTICKCOUNT();
+ ***/
+
+ m_bUseOverlay = FALSE;
+
+ // User may own art of the video region outside of site rect.
+ if (m_pUser)
+ {
+ m_pUser->HandleEvent(pEvent);
+ }
+
+ // Do not propagete this event.
+ handled = TRUE;
+ }
+ else if (macEvent->what == nullEvent)
{
ProcessSerialNumber currentPSN;
ProcessSerialNumber frontPSN;
+ /*** MBO - Disable restoring of overlay after damage
+ if (!m_bUseOverlay)
+ {
+ m_bUseOverlay = IsTimeToRetryOverlay();
+ }
+ ***/
+
::GetCurrentProcess(¤tPSN);
::GetFrontProcess(&frontPSN);
@@ -836,146 +863,132 @@
handled = TRUE;
}
}
-
- if (macEvent->what == keyDown)
- {
- char theKey = macEvent->message & 0x000000ff;
-
- if (CHXMacSite::zm_bFullScreenActive && theKey == 0x1b)
- {
- ExitFullScreen();
- }
- else
- {
- if (m_pUser)
- m_pUser->HandleEvent(pEvent);
-
- handled = pEvent->handled;
- }
- }
-
- if (macEvent->what == updateEvt || macEvent->what == activateEvt)
+ else if (macEvent->what == updateEvt || macEvent->what == activateEvt)
{
HX_ASSERT(_AtSystemTime());
- WindowPtr w = (WindowPtr)macEvent->message;
+ WindowRef w = (WindowRef) macEvent->message;
+ HXxWindow* pHXWindow = GetWindow();
+ WindowRef macWindowRef = GetWindowRefFromHXWindow(pHXWindow);
if (w)
{
- if (zm_bFullScreenActive && m_pHXxFullScreenWindow && \
m_pHXxFullScreenWindow->window
- && m_pHXxFullScreenWindow->window == w)
+ if (macWindowRef && (w == macWindowRef))
{
- GrafPtr savePort;
- ::GetPort(&savePort);
-#if defined(_CARBON) || defined(_MAC_UNIX)
- ::SetPort( GetWindowPort( w ) );
-#else
- ::SetPort(w);
-#endif
- RGBColor holdRGB;
- RGBColor theRGB = {0x0000, 0x0000, 0x0000};
- ::GetBackColor(&holdRGB);
- ::RGBBackColor(&theRGB);
-#if defined(_CARBON) || defined(_MAC_UNIX)
- Rect portRect;
- GetPortBounds( GetWindowPort( w ), &portRect );
- ::EraseRect( &portRect );
-#else
- ::EraseRect(&w->portRect);
-#endif
- ::RGBBackColor(&holdRGB);
- ::SetPort(savePort);
- }
-
- m_pTopLevelSite->RecomputeClip();
+ if (zm_bFullScreenActive && m_pHXxFullScreenWindow)
+ {
+ _RepaintFullScreenSurroundings(FALSE);
+ }
- // see if overlay is active... if so, then we might just need
- // to fill with a color key!
- if (CMacSurface::zm_pOverlaySurface)
- {
- CMacSurface* pMacSurface = (CMacSurface*)m_pVideoSurface;
- if (pMacSurface == CMacSurface::zm_pOverlaySurface)
+ if (m_pUser)
{
- // aha! THIS site's surface is in fact the overlay surface.
- m_pVideoSurface->FillColorKey();
+ m_pUser->HandleEvent(pEvent);
}
- }
- HXxRect siteRectToDamage;
- siteRectToDamage.left = 0;
- siteRectToDamage.top = 0;
- siteRectToDamage.right = m_size.cx;
- siteRectToDamage.bottom = m_size.cy;
- _RecursiveDamageRect(&siteRectToDamage, FALSE);
- _ForceRedrawAll();
- }
- HXxWindow* pWindow = GetWindow();
- if (pWindow && ::GetWindowFromPort(GetGrafPortFromHXWindow(pWindow)) == \
(WindowPtr)macEvent->message)
- {
- // XXXbobclark commented out 'cause it's already done for "honest"
- // update events. I don't wanna do this for fake update events.
-// m_pTopLevelSite->RecomputeClip();
-// ForceRedraw();
- if (pEvent->param2 && _AtSystemTime())
- {
- // for update events, param2 may contain a RgnHandle into
- // which we add the area that we are handling updates in,
- // so the TLC knows it doesn't have to draw there.
+ // m_pTopLevelSite->RecomputeClip();
+
+ // see if overlay is active... if so, then we might just need
+ // to fill with a color key!
+ if (CMacSurface::zm_pOverlaySurface)
+ {
+ CMacSurface* pMacSurface = (CMacSurface*)m_pVideoSurface;
+ if (pMacSurface == CMacSurface::zm_pOverlaySurface)
+ {
+ // aha! THIS site's surface is in fact the overlay surface.
+ m_pVideoSurface->FillColorKey();
+ }
+ }
- if (m_bBltHasBeenCalled)
+ HXBOOL bRedraw = FALSE;
+ HXxRect siteRectToDamage;
+
+ if (pEvent->param2)
{
- if (!m_bThisOrAChildHasBlitted)
+ // For update events, param2 may contain a HXREGION*
+ // indicating the area needing the update
+ HXREGION* pDamagedRegion = (HXREGION*) pEvent->param2;
+ HXREGION* pIntersectRegion = HXCreateRegion();
+
+ if (pIntersectRegion)
{
- CHXMacSite* pMacSite = this;
- while (pMacSite)
+ HXOffsetRegion(pDamagedRegion, -pHXWindow->x, -pHXWindow->y);
+ HXIntersectRegion(pDamagedRegion, m_RegionWithoutChildren, pIntersectRegion);
+ HXOffsetRegion(pDamagedRegion, pHXWindow->x, pHXWindow->y);
+
+ if (!HXEmptyRegion(pIntersectRegion))
{
- pMacSite->m_bThisOrAChildHasBlitted = TRUE;
- pMacSite = (CHXMacSite*)pMacSite->m_pParentSite;
+ siteRectToDamage.left = pIntersectRegion->extents.x1;
+ siteRectToDamage.top = pIntersectRegion->extents.y1;
+ siteRectToDamage.right = pIntersectRegion->extents.x2;
+ siteRectToDamage.bottom = pIntersectRegion->extents.y2;
+
+ bRedraw = TRUE;
}
+
+ HXDestroyRegion(pIntersectRegion);
}
}
+ else
+ {
+ // No update region constraint.
+ // Damage everything.
+ siteRectToDamage.left = m_topleft.x;
+ siteRectToDamage.top = m_topleft.y;
+ siteRectToDamage.right = siteRectToDamage.left + m_size.cx;
+ siteRectToDamage.bottom = siteRectToDamage.bottom + m_size.cy;
+
+ bRedraw = TRUE;
+ }
- if (m_bThisOrAChildHasBlitted)
+ if (bRedraw)
{
- RgnHandle handledRgn = ::NewRgn();
- RgnHandle passedInRgn = (RgnHandle)pEvent->param2;
-
- HXxPoint ptSiteOrigin;
- GetMacContentAreaOffset(ptSiteOrigin);
-
- Rect myRect = { ptSiteOrigin.y, ptSiteOrigin.x,
- ptSiteOrigin.y + m_size.cy,
- ptSiteOrigin.x + m_size.cx };
-
- ::RectRgn(handledRgn, &myRect);
- ::UnionRgn(passedInRgn, handledRgn, passedInRgn);
- ::DisposeRgn(handledRgn);
+ _RecursiveDamageRect(&siteRectToDamage, FALSE);
+ _ForceRedrawAll();
}
}
- }
-
- if (m_hHScrollBar || m_hVScrollBar)
- {
- Point oldOrigin;
- Rect portRect;
- GetPortBounds(GetWindowPort(w), &portRect);
- oldOrigin.h = portRect.left;
- oldOrigin.v = portRect.top;
- if (m_hHScrollBar)
+ if (m_hHScrollBar || m_hVScrollBar)
{
- ::Draw1Control(m_hHScrollBar);
- handled = TRUE;
+ Point oldOrigin;
+ Rect portRect;
+ GetPortBounds(GetWindowPort(w), &portRect);
+ oldOrigin.h = portRect.left;
+ oldOrigin.v = portRect.top;
+
+ if (m_hHScrollBar)
+ {
+ ::Draw1Control(m_hHScrollBar);
+ handled = TRUE;
+ }
+ if (m_hVScrollBar)
+ {
+ ::Draw1Control(m_hVScrollBar);
+ handled = TRUE;
+ }
}
- if (m_hVScrollBar)
+ }
+
+ handled = TRUE;
+ }
+ else if (macEvent->what == keyDown)
+ {
+ char theKey = macEvent->message & 0x000000ff;
+
+ if (CHXMacSite::zm_bFullScreenActive && theKey == 0x1b)
+ {
+ ExitFullScreen();
+ }
+ else
+ {
+ if (m_pUser)
{
- ::Draw1Control(m_hVScrollBar);
- handled = TRUE;
+ m_pUser->HandleEvent(pEvent);
}
+
+ handled = pEvent->handled;
}
}
-
- if (macEvent->what == mouseDown || macEvent->what == mouseUp)
+ else if (macEvent->what == mouseDown || macEvent->what == mouseUp)
{
ControlHandle theControl = NULL;
@@ -1105,6 +1118,7 @@
}
}
}
+
return handled;
}
@@ -1135,39 +1149,193 @@
/************************************************************************
* Method:
- * CHXMacSite::_ConvertRegionToMacRegion
+ * PaintVideoBackgroundInWindow
+ * pWindow - window to paint
+ * pExcludeRect - rect to exclude from painiting
+ * bLocalRect - TRUE if rect in window local coordinates
+ * FALSE if rect in window global coordinates
+ */
+/* static */
+void PaintVideoBackgroundInWindow(HXxWindow* pWindow, HXxRect* pExcludeRect, HXBOOL \
bLocalRect) +{
+ GrafPtr regionPort = GetGrafPortFromHXWindow(pWindow);
+
+ if (regionPort)
+ {
+ RgnHandle videoRgn = ::NewRgn();
+
+ if (videoRgn)
+ {
+ RgnHandle clipRgn = ::NewRgn();
+
+ ::SetRectRgn(videoRgn,
+ (short) pWindow->x,
+ (short) pWindow->y,
+ (short) pWindow->x + pWindow->width,
+ (short) pWindow->y + pWindow->height);
+
+ if (clipRgn)
+ {
+ ::SetRectRgn(clipRgn,
+ (short) pWindow->clipRect.left,
+ (short) pWindow->clipRect.top,
+ (short) pWindow->clipRect.right,
+ (short) pWindow->clipRect.bottom);
+
+ ::SectRgn(videoRgn, clipRgn, videoRgn);
+
+ ::DisposeRgn(clipRgn);
+ }
+
+ if (pExcludeRect)
+ {
+ RgnHandle excludeRgn = ::NewRgn();
+
+ if (excludeRgn)
+ {
+ ::SetRectRgn(excludeRgn,
+ (short) pExcludeRect->left,
+ (short) pExcludeRect->top,
+ (short) pExcludeRect->right,
+ (short) pExcludeRect->bottom);
+
+ if (bLocalRect)
+ {
+ ::OffsetRgn(excludeRgn, (short) pWindow->x, (short) pWindow->y);
+ }
+
+ ::DiffRgn(videoRgn, excludeRgn, videoRgn);
+
+ ::DisposeRgn(excludeRgn);
+ }
+ }
+
+ PaintVideoBackgroundInMacRegion(regionPort, videoRgn);
+
+ ::DisposeRgn(videoRgn);
+ }
+ }
+}
+
+
+/************************************************************************
+ * Method:
+ * PaintVideoBackgroundInRegion
+ * pWindow - window within which to paint given region
+ * pRegion - region to exclude from painiting
+ * bLocalRegion - TRUE if region in window local coordinates
+ * FALSE if region in window global coordinates
+ */
+/* static */
+void PaintVideoBackgroundInRegion(HXxWindow* pWindow, HXREGION* pRegion, HXBOOL \
bLocalRegion) +{
+ GrafPtr regionPort = GetGrafPortFromHXWindow(pWindow);
+
+ if (regionPort)
+ {
+ RgnHandle videoRgn = ConvertRegionToMacRegion(pRegion);
+
+ if (videoRgn)
+ {
+ RgnHandle clipRgn = ::NewRgn();
+
+ if (bLocalRegion)
+ {
+ ::OffsetRgn(videoRgn, (short) pWindow->x, (short) pWindow->y);
+ }
+
+ if (clipRgn)
+ {
+ ::SetRectRgn(clipRgn,
+ (short) pWindow->clipRect.left,
+ (short) pWindow->clipRect.top,
+ (short) pWindow->clipRect.right,
+ (short) pWindow->clipRect.bottom);
+
+ ::SectRgn(videoRgn, clipRgn, videoRgn);
+
+ ::DisposeRgn(clipRgn);
+ }
+
+ PaintVideoBackgroundInMacRegion(regionPort, videoRgn);
+
+ ::DisposeRgn(videoRgn);
+ }
+ }
+}
+
+
+/************************************************************************
+ * Method:
+ * PaintVideoBackgroundInMacRegion
+ * regionPort - port to paitn region in
+ * macRegion - region to paint in port local coordinates
+ */
+/* static */
+void PaintVideoBackgroundInMacRegion(GrafPtr regionPort, RgnHandle macRegion)
+{
+ GrafPtr savePort;
+ Rect savePortRect;
+ RGBColor saveRGB;
+ RGBColor repaintRGB = {0x0000, 0x0000, 0x0000};
+ // Pattern solidPattern = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
+
+ ::GetPort(&savePort);
+ ::SetPort(regionPort);
+
+ ::GetPortBounds(regionPort, &savePortRect);
+
+ SetOriginAndMaintainClipRgn(0, 0);
+
+ ::GetBackColor(&saveRGB);
+ ::RGBBackColor(&repaintRGB);
+ // ::BackPat(&solidPattern);
+ ::EraseRgn(macRegion);
+ // ::FillRect(&bounds, &solidPattern);
+ ::RGBBackColor(&saveRGB);
+
+ SetOriginAndMaintainClipRgn(savePortRect.left, savePortRect.top);
+
+ ::SetPort(savePort);
+}
+
+
+/************************************************************************
+ * Method:
+ * ConvertRegionToMacRegion
* utility function to convert between the RealNetworks
* regions that the site classes use and Mac-specific
* RgnHandle's.
*/
/* static */
-RgnHandle
-CHXMacSite::_ConvertRegionToMacRegion( HXREGION* pRegion )
+RgnHandle ConvertRegionToMacRegion(HXREGION* pRegion)
{
- HX_ASSERT(IsMacInCooperativeThread());
- if ( !IsMacInCooperativeThread() ) return nil; // Hoo-boy would this ever suck
-
- RgnHandle rgn = ::NewRgn();
+ RgnHandle retRgn = ::NewRgn();
- if ( rgn )
+ if (retRgn)
{
- ::OpenRgn();
+ RgnHandle tempRectRgn = ::NewRgn();
- for ( long i = 0; i < pRegion->numRects; i++ )
+ if (tempRectRgn)
{
- Rect r;
- r.left = pRegion->rects[i].x1;
- r.top = pRegion->rects[i].y1;
- r.right = pRegion->rects[i].x2;
- r.bottom = pRegion->rects[i].y2;
+ long i;
- ::FrameRect( &r );
+ for (i = 0; i < pRegion->numRects; i++)
+ {
+ ::SetRectRgn(tempRectRgn,
+ (short) pRegion->rects[i].x1,
+ (short) pRegion->rects[i].y1,
+ (short) pRegion->rects[i].x2,
+ (short) pRegion->rects[i].y2);
+
+ ::UnionRgn(tempRectRgn, retRgn, retRgn);
+ }
+
+ ::DisposeRgn(tempRectRgn);
}
-
- ::CloseRgn( rgn );
}
- return rgn;
+ return retRgn;
}
@@ -1724,85 +1892,20 @@
m_pHXxFullScreenWindow->window &&
m_bInFullScreen)
{
- RgnHandle macFSWindowRgn = ::NewRgn();
- RgnHandle macTLSRgn = ::NewRgn();
- RgnHandle macFSSurroundRgn = ::NewRgn();
-
- retVal = HXR_OUTOFMEMORY;
+ HXxRect excludeRect;
+ HXxRect* pExcludeRect = NULL;
- if (macFSWindowRgn && macTLSRgn && macFSSurroundRgn)
+ if (!bPaintOverSites)
{
- GrafPtr fsPort;
- GrafPtr savePort;
- Rect savePortRect;
- RGBColor saveRGB;
- RGBColor repaintRGB = {0x0000, 0x0000, 0x0000};
- // Pattern solidPattern = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
-
- retVal = HXR_OK;
-
- if (bPaintOverSites)
- {
- ::SetRectRgn(macFSSurroundRgn,
- 0,
- 0,
- (short) m_pHXxFullScreenWindow->width,
- (short) m_pHXxFullScreenWindow->height);
- }
- else
- {
- ::SetRectRgn(macFSWindowRgn,
- 0,
- 0,
- (short) m_pHXxFullScreenWindow->width,
- (short) m_pHXxFullScreenWindow->height);
-
- ::SetRectRgn(macTLSRgn,
- (short) m_position.x,
- (short) m_position.y,
- (short) (m_position.x + m_size.cx),
- (short) (m_position.y + m_size.cy));
-
- ::DiffRgn(macFSWindowRgn, macTLSRgn, macFSSurroundRgn);
- }
-
-
- ::GetPort(&savePort);
-
- fsPort = GetWindowPort((WindowPtr) m_pHXxFullScreenWindow->window);
- ::SetPort(fsPort);
-
- ::GetPortBounds(fsPort, &savePortRect);
-
- SetOriginAndMaintainClipRgn(-m_pHXxFullScreenWindow->x, \
-m_pHXxFullScreenWindow->y);
- // ::InvalWindowRect((WindowPtr) m_pHXxFullScreenWindow->window, &bounds);
-
- ::GetBackColor(&saveRGB);
- ::RGBBackColor(&repaintRGB);
- // ::BackPat(&solidPattern);
- ::EraseRgn(macFSSurroundRgn);
- // ::FillRect(&bounds, &solidPattern);
- ::RGBBackColor(&saveRGB);
-
- SetOriginAndMaintainClipRgn(savePortRect.left, savePortRect.top);
+ excludeRect.left = m_pTopLevelSite->m_position.x;
+ excludeRect.top = m_pTopLevelSite->m_position.y;
+ excludeRect.right = excludeRect.left + m_pTopLevelSite->m_size.cx;
+ excludeRect.bottom = excludeRect.top + m_pTopLevelSite->m_size.cy;
- ::SetPort(savePort);
- }
-
- if (macFSWindowRgn)
- {
- ::DisposeRgn(macFSWindowRgn);
- }
-
- if (macTLSRgn)
- {
- ::DisposeRgn(macTLSRgn);
- }
-
- if (macFSSurroundRgn)
- {
- ::DisposeRgn(macFSSurroundRgn);
+ pExcludeRect = &excludeRect;
}
+
+ PaintVideoBackgroundInWindow(m_pHXxFullScreenWindow, pExcludeRect, FALSE);
}
return retVal;
Index: macsurf.cpp
===================================================================
RCS file: /cvsroot/video/sitelib/platform/mac/macsurf.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- macsurf.cpp 5 Jun 2007 19:15:30 -0000 1.24
+++ macsurf.cpp 8 Jun 2007 08:24:04 -0000 1.25
@@ -1,7 +1,8 @@
/* ***** BEGIN LICENSE BLOCK *****
* Source last modified: $Id$
*
- * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.
+ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.m_pSite
+
*
* The contents of this file, and the files included with this file,
* are subject to the current version of the RealNetworks Public
@@ -161,6 +162,7 @@
CMacSurface::CMacSurface(IUnknown* pContext, CHXBaseSite* pSite)
: CBaseSurface(pContext, pSite)
, m_pLastEntireRegion(NULL)
+ , m_bUsesOverlay(FALSE)
{
zm_SurfaceList.AddTail(this);
}
@@ -382,6 +384,7 @@
if (sLastOrigin.h != originalOrigin.h || sLastOrigin.v != originalOrigin.v) \
bOverlayRebuildingRequired = TRUE; if (zm_pOverlayBuf == nil) \
bOverlayRebuildingRequired = TRUE; if (surfacePort != sLastPort) \
bOverlayRebuildingRequired = TRUE; + if (m_bUsesOverlay != (m_bUseOverlays && \
(((CHXMacSite*) (m_pSite->m_pTopLevelSite))->m_bUseOverlay || \
m_pSite->m_bInFullScreen))) bOverlayRebuildingRequired = TRUE;
// xxxbobclark this catch up workaround is necessary because with some
// parameters of the overlay while the TLC is resizing, a glitch can
@@ -514,7 +517,7 @@
if (bOverlayRebuildingRequired)
{
- newMaskRgn = CHXMacSite::_ConvertRegionToMacRegion(pEntireReg);
+ newMaskRgn = ConvertRegionToMacRegion(pEntireReg);
CHXMacSite* pMacSite = (CHXMacSite*)zm_pOverlaySurface->m_pSite;
// xxxbobclark should we shrink the region if we have scrollbars? I \
certainly think so! @@ -553,10 +556,15 @@
// offset region to site coordinates to mask the site
::OffsetRgn(newMaskRgn, -siteOffsetFromPort.x, -siteOffsetFromPort.y);
- // Trimming the masking region by pixel removes smearing
- // of video image while scrolling in the browser.
- // Investgation of the cause (refresh event handling?) and proper fix are TBD.
- ::SetRectRgn(trimRgn, 0, 0, (s.cx > 0) ? (s.cx - 1) : 0, (s.cy > 0) ? (s.cy - \
1) : 0); + // Always use overlay in full-screen
+ m_bUsesOverlay = (m_bUseOverlays && (((CHXMacSite*) \
m_pSite->m_pTopLevelSite)->m_bUseOverlay || m_pSite->m_bInFullScreen)); +
+ // Trimming the masking region by pixel fill kick us out of overlay
+ ::SetRectRgn(trimRgn,
+ 0,
+ 0,
+ m_bUsesOverlay ? s.cx : ((s.cx > 0) ? (s.cx - 1) : 0),
+ s.cy);
::SectRgn(newMaskRgn, trimRgn, newMaskRgn);
::DisposeRgn(trimRgn);
@@ -742,6 +750,40 @@
SetOriginAndMaintainClipRgn(oldOrigin.h, oldOrigin.v);
::SetPort(savePort);
+
+ if (m_pSite &&
+ m_pSite->m_pTopLevelSite &&
+ (!m_pSite->m_pTopLevelSite->m_bInFullScreen) &&
+ m_pSite->m_pTopLevelSite->m_pDelegatedSite)
+ {
+ EventRecord macEvent;
+ HXxEvent hxEvent;
+ HXREGION* pUpdatedRegion;
+ HXxSize siteContainerSize = { 0, 0 };
+
+ m_pSite->GetSize(siteContainerSize);
+
+ pUpdatedRegion = HXCreateRectRegion(offset.x,
+ offset.y,
+ siteContainerSize.cx,
+ siteContainerSize.cy);
+
+ macEvent.what = updateEvt;
+ macEvent.message = (UInt32) ::GetWindowFromPort(origPort);
+ macEvent.when = 0;
+ macEvent.where.v = 0;
+ macEvent.where.h = 0;
+ macEvent.modifiers = 0;
+
+ hxEvent.event = macEvent.what;
+ hxEvent.window = (void*) macEvent.message;
+ hxEvent.param1 = &macEvent;
+ hxEvent.param2 = pUpdatedRegion;
+ hxEvent.handled = FALSE;
+ hxEvent.result = HXR_OK;
+
+ m_pSite->m_pTopLevelSite->m_pDelegatedSite->EventOccurred(&hxEvent);
+ }
}
}
_______________________________________________
Video-cvs mailing list
Video-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/video-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic