Closed Bug 626172 Opened 14 years ago Closed 5 years ago

Bind Firefox windows to specific OS X spaces

Categories

(Firefox :: Session Restore, enhancement)

x86
macOS
enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 440895

People

(Reporter: notforyourmail, Unassigned)

References

(Blocks 1 open bug)

Details

User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b10pre) Gecko/20110115 Firefox/4.0b10pre
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b10pre) Gecko/20110115 Firefox/4.0b10pre

In OS X, you can place each Firefox window in a different space.  This is particularly useful if you work on a different task or project in each space, and want the relevant window in each.  However, when Firefox is restarted, all of the browser windows appear in the current space, not in their previous spaces.  A much better behavior would be for each window to appear in the space that it was last open in, in the position on the screen that it was last open in.  That would allow Firefox to completely resume its previous state in all spaces.  Currently, after restart, all windows must be manually repositioned to the appropriate spaces.

Reproducible: Always

Steps to Reproduce:
1.  Open multiple Firefox windows.
2.  Open some tabs in each
3.  Place each in a different space
4.  Restart Firefox
5.  All windows appear in the current space, not where they were before.
Actual Results:  
All windows appear in the current space, not where they were before.  Each window must be manually relocated.

Expected Results:  
On quit, the browser should record the current space and screen position for each window.  On restart, all windows should appear in exactly the same position and space as before.  Effectively, a user should be able to restart their browser without seeing any difference between the state of the browser before and after the restart.
I really want this. Also, I don't see it as an enhancement, rather a bug in session restoration.
Severity: enhancement → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
A brief look indicates that there is no API for accomplishing this, sadly.
Most of my other programs seem to be able to do it.
Safari supports this.
Here is a similar issue for Chromium: https://code.google.com/p/chromium/issues/detail?id=74812
I just updated that Chromium bug report with the following information:

I added two separate bugs about this to Apple's Bug Report system (http://bugreport.apple.com/):

21488847 - Inconsistent Window Restoration with Spaces on App Restart
21489567 - Inconsistent Non-Apple App Window Restoration with Spaces on Reboot

I received responses from Apple on both of them.  Here are those responses:

On App Restart Ignoring Spaces (21488847):

    "This issue behaves as intended based on the following:
    Application restart does not preserve space assignment.
    We are now closing this bug report.

    If you have questions about the resolution, or if this is still
    a critical issue for you, then please update your bug report with
    that information.

    Please be sure to regularly check new Apple releases for any
    updates that might affect this issue."

On System Reboot, Apps Ignore Spaces (21489567):

    "We have determined that this is an issue for you to resolve.
    These sound like bugs in [apps that I listed, including Chrome].

    That is, if they’re trying to do their own state restoration and
    not going through NSWindow, the space isn’t going to be restored.

    These apps need to use NSWindow’s encodeRestorableStateWithCoder:
    and restoreStateWithCoder:.

    Please let us know whether the issue is resolved for you by
    updating your bug report."

According to Apple QA and Apple's own Application behavior with respect to Spaces, it appears that Spaces restoration during reboot is entirely possible with standard APIs while Spaces restoration during basic Application restart (quit+reopen) doesn't work BY DESIGN.

My guess is that Apple can't guarantee that the layout of Spaces won't change between the time an Application is quit and then reopened, but it CAN during a reboot.  There are definitely ways that this could be handled but Apple does not appear to have prioritized the feature.

At the very least it appears that Firefox could be updated to work like Apple apps and restore to correct Spaces across system reboot!
Hmpf. Seems disappointing -- I'd expect that people run into this issue far more frequently via restarting an app (quit + later relaunch) that outright rebooting their whole machine.
Blocks: ss-feature
Type: defect → enhancement
Component: General → Session Restore
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.