Bug 1708324 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Haik Aftandilian [:haik] from comment #10)
> (In reply to Edgar Chen [:edgar] from comment #8)
> > (In reply to Edgar Chen [:edgar] from comment #7)
> > > It doesn't clear to me what cause the occlusion state changes, the fullscreen seems not to always make occlusion state fliping back and forth.
> > 
> > Hi Haik, do you have any idea what would possible cause occlusion state filping while widget goes into fullscreen mode.
> > The occlusion changes is from https://searchfox.org/mozilla-central/rev/6371054f6260a5f8844846439297547f7cfeeedd/widget/cocoa/nsCocoaWindow.mm#2909-2913.
> > Thanks!
> 
> Hi, I don't know what is triggering the occlusion event. I have some tracing code setup to help debug fullscreen so I will take a look at this case.

When we transition to fullscreen we create a new window for the animation in `nsCocoaWindow::PrepareForFullscreenTransition()` for the black screen effect (i.e., fill the screen with black temporarily when going in/out of fullscreen)[1]. So it follows that we would receive occlusion events because the existing window is fully occluded for some period of time.

If it makes sense to solve this at the widget layer, having Mac widget code ignore the occlusion events during that time sounds reasonable to me. And I think it's appropriate to fix there because the occlusion event is a side effect of the Mac-specific implementation.

This might change when we transition to using native fullscreen in bug 1563947.
(In reply to Haik Aftandilian [:haik] from comment #10)
> (In reply to Edgar Chen [:edgar] from comment #8)
> > (In reply to Edgar Chen [:edgar] from comment #7)
> > > It doesn't clear to me what cause the occlusion state changes, the fullscreen seems not to always make occlusion state fliping back and forth.
> > 
> > Hi Haik, do you have any idea what would possible cause occlusion state filping while widget goes into fullscreen mode.
> > The occlusion changes is from https://searchfox.org/mozilla-central/rev/6371054f6260a5f8844846439297547f7cfeeedd/widget/cocoa/nsCocoaWindow.mm#2909-2913.
> > Thanks!
> 
> Hi, I don't know what is triggering the occlusion event. I have some tracing code setup to help debug fullscreen so I will take a look at this case.

When we transition to fullscreen we create a new window for the animation in `nsCocoaWindow::PrepareForFullscreenTransition()` for the black screen effect (i.e., fill the screen with black temporarily when going in/out of fullscreen)[1]. So it follows that we would receive occlusion events because the existing window is fully occluded for some period of time.

If it makes sense to solve this at the widget layer, having Mac widget code ignore the occlusion events during that time sounds reasonable to me. And I think it's appropriate to fix there because the occlusion event is a side effect of the Mac-specific implementation.

1. This might change when we transition to using native fullscreen in bug 1563947.

Back to Bug 1708324 Comment 11