Open Bug 1112374 Opened 10 years ago Updated 2 years ago

Window positions are not remembered properly on OSX

Categories

(Firefox :: Session Restore, defect)

37 Branch
x86
macOS
defect

Tracking

()

People

(Reporter: melanie, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0
Build ID: 20130511120803

Steps to reproduce:

Updated Firefox to latest version on my Notebook. It has always been a part of my workflow to push windows I'm not currently working with down so that only the title bar is visible at the bottom of the screen. 


Actual results:

After restarting Firefox or the computer, all windows that were positioned off screen as explained above would be restored to be fully visible instead of off the screen bottom, creating a lot of work to restore the desired off screen positions.


Expected results:

The windows should have been restored to their original, offscreen positions as earlier versions of Firefox used to do.
Thanks for the well-worded and clear bugreport.

I'm pretty sure this was a change reviewed by Tim... so I'm checking with him, but as I understand it, we're trying to make sure that windows fit within the screen when they are restored. This is meant to deal with cases where, for instance, you're using an external monitor in addition to your notebook screen, close Firefox while a window was open on the external screen, and then reopen it after the external screen was disconnected, leaving a window you can't (or can barely) get to open where you can't see it.

I don't really see a way of distinguishing the two cases easily, without a lot more work (e.g. checking screen dimensions from session store). There's also the factor of web pages that try to position windows off-screen... 

Tim, anything we can do here to fix Melanie's problem without breaking things for other people? Maybe we could store the dimensions of the screen(s) in the sessionstore file and only do the repositioning if they've changed since we closed Firefox?
Component: Untriaged → Session Restore
Flags: needinfo?(ttaubert)
Blocks: 864107
One option that would yield acceptable results would be to move each window to be at least 12-14 pixels inside the closest screen boundary. That would make completely off screen windows recoverable since some part of the title bar would be guaranteed to be visible. OSX already prevents windows from going off the top of the screen anyway, so windows could be partially off screen only to the left, right and bottom. By ensuring that at least 12 pixels of every window are visible, the user retains control of them without having to move them fully onscreen.

Another option would be to, for each window, remember a flag to show if the window was aff screen when saved, and to only reposition windows to be fully on screen if the window was fully (or nearly, say, 80%) on screen when saved. That would take case of changed multi monitors quite nicely.

Finally, an about:config option could also be used to control the repositioning behavior, allowing the user a choice without cluttering the interface.

Additionally, I observed that by connecting a secondary, low resolution (720p TV) monitor, all windows were resized to fit that smaller screen, despite the fact that no window was placed on it. Resizing the user's windows is an extremely bad choice as a user will normally size a window to have the content displayed in a pleasing way. Making the windows smaller automatically, especially when not needed, causes a jarring user experience and creates much work to restore the windows to their prior size manually.

As OSX windows can now (since Mountain Lion, I believe) be resized from any edge, the user is no longer prevented from regaining control of a window that is larger than the physical screen. Resizing windows without even asking the user is therefore not necessary, the only thing required here is, again, that some small portion of the title bar is on screen. The user can do the rest.

Right now, I am in the unenviable position to try and find a way to revert to FF 21 which didn't have these annoying behaviors.
(In reply to :Gijs Kruitbosch from comment #1)
> Tim, anything we can do here to fix Melanie's problem without breaking
> things for other people? Maybe we could store the dimensions of the
> screen(s) in the sessionstore file and only do the repositioning if they've
> changed since we closed Firefox?

I feel like that might actually work. We'd have to store and check the number and sizes of screens? OTOH you could not easily access any window that was pushed out of screen bounds deliberately by misbehaving code. I'm also not sure how that works with virtual desktops common on Linux/OS X and introduced with Windows 10 I think.
Flags: needinfo?(ttaubert)
Is this not a duplicate of bug 890125?
Keywords: regression
Reproducible in Nightly
Version 	49.0a1
Build ID 	20160602030220
User Agent 	Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
No longer depends on: ss-reliability
Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 19 votes.
:dao, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dao+bmo)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(dao+bmo)
You need to log in before you can comment on or make changes to this bug.