Closed Bug 1929887 Opened 4 months ago Closed 3 months ago

Firefox 133 stopped saving previous window position when closed in maximized state

Categories

(Firefox :: Session Restore, defect)

Firefox 133
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: degust, Unassigned)

References

Details

(Keywords: regression, regressionwindow-wanted)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0

Steps to reproduce:

  1. Start Firefox (133 beta 5 right now)
  2. Make it windowed and put the window in a specific place on the desktop.
  3. Maximize Firefox window.
  4. Close Firefox.
  5. Start it again.
  6. "Restore" its window from maximized to windowed state.

Actual results:

Firefox window will always be restored in the top left corner of the desktop instead of the position it was set by the user to in step 2 above.

If Firefox window would be restored from maximized state to windowed prior to closing Firefox then window position would be saved and used correctly on next Firefox launch.

Expected results:

This started happening on FF 133 beta 1, wasn't the case with previous FF versions.

Previous versions would restore previous Firefox's window position properly even when they were relaunched after being closed in a maximized window state.

OS is Windows 11 24H2 x64.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Win32' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Win32
Product: Firefox → Core

The severity field is not set for this bug.
:rkraesig, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(rkraesig)

Well! This is an unpleasant thing to find to have slipped through the cracks.

I can conditionally repro. Tests so far have yielded the following:

Nightly Beta Release mozregression
Win10 laptop 🟢 🟢 🟢
Win10 desktop 🟢 🟢 🟢 ---
Win11 laptop 🟢 🟢 ---
Win11 convertible 🟢¹ 🟢 🟢²

 

Legend:
🟢 bug not reproduced
bug reproduced
--- not yet tested

¹: EDIT: This originally read ❌. I'm not sure if I tested the wrong thing or if it actually failed the first time, but I cannot reproduce the bug here. Nightly still fails consistently on this device.
²: EDIT: Added, following testing (on both mozilla-central and mozilla-beta).


Note that when testing on my Win10 laptop, I could not repro in mozregression, even when using the same profile that fails in the current Beta. Testing procedure:

  • Open Firefox Beta; resize and move a window; maximize it; exit.
  • Start mozregression on mozilla-beta using that profile (with clone semantics).
    • For each version tested, restore the window.
  • Afterwards, reload the profile in the installed Fx Beta and restore the window.

Every version tested in mozregression restored the window to the correct location; only the installed version failed.

Severity: -- → S3
Flags: needinfo?(rkraesig)
Priority: -- → P3

I think this is slightly more likely to be a Session Restore thing, but not by much. Forwarding there in hopes of further insight.

Severity: S3 → --
Status: UNCONFIRMED → NEW
Component: Widget: Win32 → Session Restore
Ever confirmed: true
Priority: P3 → --

This is probably Firefox: Session Restore

Product: Core → Firefox
Keywords: regression

Updated to 134b1, same issue remain.

134b5 seem to have fixed the bug for me.

I want to see how we store this state - when we quit with a maximised window.

:rkraesig, are you able to reproduce on the latest beta?

Flags: needinfo?(sfoster)
Flags: needinfo?(rkraesig)
See Also: → 1934238

(In reply to Sam Foster [:sfoster] (he/him) from comment #8)

I want to see how we store this state - when we quit with a maximised window.

:rkraesig, are you able to reproduce on the latest beta?

No, neither on the Win10 laptop nor the Win11 convertible.

Flags: needinfo?(rkraesig)
QA Whiteboard: [qa-regression-triage]

What should happen is that for a maximized window, the following window data properties get stored:

      "width": 800,
      "height": 873,
      "screenX": 780,
      "screenY": 7,
      "sizemode": "maximized",

The sizemode tells us the window was maximised, and the width/height there are the dimensions of the window before it was maximised. These are the dimensions the window will be restored to when we un-maximise.

If that is not happening, I'd first want to ensure that the session was saved and restored without error (did the correct windows and tabs get re-opened.)

But it looks like this was confined to a particular beta and is now fixed? I'll close as worksforme, but a regression window might still be useful to identify what broke it and what fixed it. And of course please re-open if we're still running into this somewhere.

Status: NEW → RESOLVED
Closed: 3 months ago
Flags: needinfo?(sfoster)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.