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
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: Trunk
: x86_64 Windows 7
-- normal (vote)
: Firefox 14
Assigned To: Chris Pearce (:cpearce)
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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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

Description User image Chris Pearce (:cpearce) 2012-03-25 18:12:48 PDT
Regression from f9c6dbf41832 in Bug 639705.

1. Load 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:

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 User image Chris Pearce (:cpearce) 2012-03-25 18:18:13 PDT
Created attachment 609183 [details] [diff] [review]

See comment 0 for explanation of fix.
Comment 2 User image 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 User image Ed Morley [:emorley] 2012-03-27 05:27:46 PDT

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