Closed Bug 645608 Opened 13 years ago Closed 13 years ago

If FF Window is minimized and restarted, the window is minimized/maximized then restored

Categories

(Firefox :: Session Restore, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 8

People

(Reporter: p225mmx, Assigned: zpao)

Details

Attachments

(2 files)

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.
Version: unspecified → 4.0 Branch
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".
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: When a Firefox Window is minimized and Firefox is quit then re-launched, the window goes through a quick and odd minimize/restore sequence. → If FF Window is minimized and restarted, the window is minimized/maximized then restored
Is it safe to assume that you only have one Firefox window open at the time?
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
Attached patch Patch v0.1Splinter Review
Simple fix.
Assignee: nobody → paul
Status: NEW → ASSIGNED
Attachment #548957 - Flags: review?(dietrich)
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.
Attachment #548957 - Flags: review?(dietrich) → review+
Attached patch Patch v1.0Splinter Review
Addressed comments
http://hg.mozilla.org/integration/mozilla-inbound/rev/f19cab5d3f77
Hardware: x86_64 → All
Whiteboard: [inbound]
Version: 4.0 Branch → Trunk
http://hg.mozilla.org/mozilla-central/rev/f19cab5d3f77
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: