Closed Bug 1831967 Opened 1 year ago Closed 1 year ago

Make nsCocoaWindow suppress occlusion events during native fullscreen transition

Categories

(Core :: Widget: Cocoa, defect, P3)

Unspecified
macOS
defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: bradwerth, Assigned: bradwerth)

References

Details

Attachments

(1 file)

nsCocoaWindow currently responds to all NSWindowDelegate calls to windowDidChangeOcclusionState by potentially sending a OcclusionStateChanged event. During a native fullscreen transition, a window may move through occlusion states before settling on its final state, which is the only one that is actually relevant to the user. However, these changes in occlusion state create timing windows of failure for various API calls that require a window to be visible. To avoid this unwanted side effect, this change makes nsCocoaWindow ignore calls to that method during the fullscreen transition. The final call -- after the transition -- will send the steady-state OcclusionStateChanged event.

In addition to suppressing the sending of OcclusionStateChanged events,
this also creates a helper method that is called by both
windowDidEnterFullScreen and windowDidExitFullScreen, which makes their
implementation better match other fullscreen delegate methods.

Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/37514705d08e
Prevent macOS OcclusionStateChanged events from being sent during native fullscreen transitions. r=mac-reviewers,mstange
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: