Closed Bug 739116 Opened 9 years ago Closed 9 years ago

Fullscreen exits upon subsequently entering fullscreen if window isn't maximized

Categories

(Firefox :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 14

People

(Reporter: cpearce, Assigned: cpearce)

References

Details

Attachments

(1 file)

Regression from f9c6dbf41832 in Bug 639705.

STR:
1. Load http://pearce.org.nz/full-screen in Firefox nightly on non-MacOSX platform
2. Ensure window is *not* maximized.
3. Press 'f' to enter fullscreen.
4. Press ESC to exit fullscreen.
5. Press 'f' to enter fullscreen.
6. Observe fullscreen exiting as soon as it enters.

Problem is here:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#4086

We're adding the "deactivate" listener |if (!this.useLionFullScreen)|, but we're removing it |if (this.useLionFullScreen)|. Currently on Windows entering fullscreen causes "deactivate" and "activate" events to be dispatched (window is lowered causing "deactivate", window is resized to fullscreen, window is raised causing "activate"), so if the listener (which is added upon first entry to fullscreen) isn't removed on fullscreen exit, entering fullscreen the second time triggers the "deactivate" listener, which kicks us out of fullscreen.

So we should be removing the "deactivate" listener |if (!this.useLionFullScreen)| rather than |if (this.useLionFullScreen)|.
Summary: Fullscreen exits upon subsequent enters if window not maximized → Fullscreen exits upon subsequently entering fullscreen if window isn't maximized
Attached patch PatchSplinter Review
See comment 0 for explanation of fix.
Attachment #609183 - Flags: review?(dao)
Attachment #609183 - Flags: review?(dao) → review+
Bah, sorry about that. Thanks for catching & fixing!
https://hg.mozilla.org/mozilla-central/rev/f21e0d068a12
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.