Last Comment Bug 739116 - Fullscreen exits upon subsequently entering fullscreen if window isn't maximized
: Fullscreen exits upon subsequently entering fullscreen if window isn't maximized
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: Firefox 14
Assigned To: Chris Pearce (:cpearce)
:
:
Mentors:
Depends on:
Blocks: 639705
  Show dependency treegraph
 
Reported: 2012-03-25 18:12 PDT by Chris Pearce (:cpearce)
Modified: 2012-03-27 05:27 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (1.11 KB, patch)
2012-03-25 18:18 PDT, Chris Pearce (:cpearce)
dao+bmo: review+
Details | Diff | Splinter Review

Description Chris Pearce (:cpearce) 2012-03-25 18:12:48 PDT
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)|.
Comment 1 Chris Pearce (:cpearce) 2012-03-25 18:18:13 PDT
Created attachment 609183 [details] [diff] [review]
Patch

See comment 0 for explanation of fix.
Comment 2 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2012-03-26 11:38:40 PDT
Bah, sorry about that. Thanks for catching & fixing!
Comment 4 Ed Morley [:emorley] 2012-03-27 05:27:46 PDT
https://hg.mozilla.org/mozilla-central/rev/f21e0d068a12

Note You need to log in before you can comment on or make changes to this bug.