Closed Bug 529674 Opened 10 years ago Closed 10 years ago

Restore windows at the saved position without moving them around on the screen

Categories

(Firefox :: Session Restore, defect)

3.6 Branch
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 3.7a1

People

(Reporter: whimboo, Assigned: zpao)

References

Details

Attachments

(1 file)

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2b4pre) Gecko/20091118 Namoroka/3.6b4pre ID:20091118034701

When a couple of windows are open and you start/stop the PB mode or restart Firefox all windows are restored at the position of the first window and moved to their target (saved) position afterward. That doesn't look nice. Can we directly restore the windows at their saved position?

Steps:
1. Open a couple of windows
2. Start/Stop the Private Browsing mode

Once you stop the Private Browsing mode you will see the mentioned behavior from above.
We should be able to now, thanks to bug 509828 (which I think was the problem). I haven't tried yet, but it should be a trivial change.

This is on my (growing) list of changes to make to sessionstore after 3.6.
Attached patch Patch v0.1Splinter Review
So I think this is all we need. I think we want to leave restoreDimensions as is (for when we reuse a window and setting sizemode).

As for testing... we call restoreDimensions in a setTimeout, so perhaps we could observe domwindowopened with window watcher & that'll fire before the restoreDimensions gets called? I can try. Otherwise is there a way to test this automatically or would we need a litmus test?
Assignee: nobody → paul
Status: NEW → ASSIGNED
Comment on attachment 414337 [details] [diff] [review]
Patch v0.1

There's a mochitest already to ensure that openWindow with height, etc. work. I tried to write another here, but it's not working out so well, so it doesn't seem worth it.

I also looked into doing sizemode at the same time, but that'd be a bigger change down in windowwatcher/widget to get working, so not worth doing here.
Attachment #414337 - Attachment description: Patch v0.1 (WIP) → Patch v0.1
Attachment #414337 - Flags: review?(zeniko)
Attachment #414337 - Flags: review?(zeniko) → review+
Pushed http://hg.mozilla.org/mozilla-central/rev/c89bea57ceb7
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
We can test this with a litmus test. Just save a session with multiple windows open & positioned around the screen. Quit and restore. The first window will still move around because we don't open that, but the subsequent windows should open where there were at quit.
Flags: in-litmus?
Verified fixed
Status: RESOLVED → VERIFIED
Blocks: 558641
You need to log in before you can comment on or make changes to this bug.