Last Comment Bug 645608 - If FF Window is minimized and restarted, the window is minimized/maximized then restored
: If FF Window is minimized and restarted, the window is minimized/maximized th...
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Session Restore (show other bugs)
: Trunk
: All Mac OS X
: -- normal with 1 vote (vote)
: Firefox 8
Assigned To: Paul O'Shannessy [:zpao] (not reading much bugmail, email directly)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-27 20:47 PDT by Cpuroast
Modified: 2011-10-12 15:27 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v0.1 (1.57 KB, patch)
2011-07-27 16:19 PDT, Paul O'Shannessy [:zpao] (not reading much bugmail, email directly)
dietrich: review+
Details | Diff | Splinter Review
Patch v1.0 (1.39 KB, patch)
2011-08-09 11:27 PDT, Paul O'Shannessy [:zpao] (not reading much bugmail, email directly)
no flags Details | Diff | Splinter Review

Description Cpuroast 2011-03-27 20:47:27 PDT
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0

If a Firefox window is in a minimized state when Firefox is quit. The next time Firefox is launched the window will go through a quick and odd minimize/restore sequence.

Reproducible: Always

Steps to Reproduce:
1.Minimize a Window
2.Quit Firefox
3.Re-launch Firefox
Actual Results:  
On re-launch the Window goes through a quick and odd minimize/restore sequence.

Expected Results:  
On re-launch the window is restored without being minimized first.
Comment 1 Teodosia Pop 2011-03-28 07:01:39 PDT
Able to reproduce using  Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0)
Gecko/20100101 Firefox/4.0 but only if "When Firefox starts" from Preferences->General is set to "Show my windows and tabs from last time".
Comment 2 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-06-15 12:28:33 PDT
Is it safe to assume that you only have one Firefox window open at the time?
Comment 3 Cpuroast 2011-06-26 20:03:01 PDT
Yup just 1 window, 

behavior is still present in Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20100101 Firefox/5.0
Comment 4 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-07-27 16:19:25 PDT
Created attachment 548957 [details] [diff] [review]
Patch v0.1

Simple fix.
Comment 5 Dietrich Ayala (:dietrich) 2011-07-29 08:15:04 PDT
Comment on attachment 548957 [details] [diff] [review]
Patch v0.1

Review of attachment 548957 [details] [diff] [review]:
-----------------------------------------------------------------

Not sure it's possible to reasonably write a test for this, so please flag for manual testing. r=me.

::: browser/components/sessionstore/src/nsSessionStore.js
@@ +352,5 @@
>            this._sessionStartTime = this._initialState.session &&
>                                     this._initialState.session.startTime ||
>                                     this._sessionStartTime;
>  
> +          let firstWindow = this._initialState.windows[0];

Actually, I liked it without the temp var, since it's abundantly clear that we're manipulating the data-to-be-restored before the restore happens.
Comment 6 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-08-09 11:27:32 PDT
Created attachment 551833 [details] [diff] [review]
Patch v1.0

Addressed comments
Comment 7 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-08-15 18:24:18 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/f19cab5d3f77
Comment 8 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-08-16 04:10:33 PDT
http://hg.mozilla.org/mozilla-central/rev/f19cab5d3f77

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