Closed Bug 1995597 Opened 2 months ago Closed 2 months ago

Firefox restoring sessions open on the wrong virtual desktop on Windows

Categories

(Core :: Widget: Win32, defect)

Firefox 144
defect

Tracking

()

RESOLVED FIXED
146 Branch
Tracking Status
firefox145 --- fixed
firefox146 --- fixed

People

(Reporter: tomelley22, Assigned: gstoll)

References

Details

Attachments

(2 files)

Firefox 144.0 on Windows 11 26120.961
Similar to issue 372650, but on Windows. There does not seem to be a tag in about:config for this behaviour as the Linux version has, making it impossible to configure.

I have "Restore previous session" enabled. This behaviour does not happen when the setting is disabled, but is not desirable.

When opening Firefox from fully closed, it opens on the wrong virtual desktop. It seems that after a boot/restore from hibernate, it always defaults to Virtual Desktop 1.

When opening a new Firefox window while the application has been closed but the computer has NOT been fully shut down (window manager not reset), the new Firefox window goes to whichever virtual desktop it was last run on - but does not switch to that virtual desktop, leaving the window hidden off-screen until the user goes searching for it.

This functionality was addressed in issue 1423768 for opening a link while Firefox is open on another desktop, but it does not seem to be working for correct placement of windows for a fresh application start (restoring previous session).

Reproduce:
"Restore previous session" turned on.
Open Firefox windows on any virtual desktop.
Close every Firefox window.
Move to another virtual desktop
Open Firefox - session window will be on the last-used desktop, not the current one.

alternatively:
"Restore previous session" turned on.
Open Firefox windows on any virtual desktop besides 1.
Close every Firefox window.
Reboot or hibernate and wake PC
Move to virtual desktop besides 1 (does not need to be newly created, Windows restores these on reboot).
Open Firefox - session window will be on desktop 1

We made this behavior a bit better in bug 1812489. Unfortunately we weren't able to find a way to switch to a virtual desktop that has a Firefox window on it. (there's no Windows API for this)

I suppose we could add a pref to ignore virtual desktops when restoring windows, it would probably just need to be added here.

Severity: -- → S4
Assignee: nobody → gstoll
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by gstoll@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e68e2097d59b https://hg.mozilla.org/integration/autoland/rev/95fd2041ca5e add pref to disable restoring windows to their virtual desktop/workspace r=sessionstore-reviewers,sthompson
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch

firefox-beta Uplift Approval Request

  • User impact if declined: very low risk fix and uplifting will align adding another virtual desktop-related pref to 145 (see bug 1994825)
  • Code covered by automated testing: no
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: n/a
  • Risk associated with taking this patch: low
  • Explanation of risk level: simple pref add and check in one spot
  • String changes made/needed: no
  • Is Android affected?: no
Attachment #9522629 - Flags: approval-mozilla-beta?
Attachment #9522629 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Release Note Request (optional, but appreciated)
[Why is this notable]: new pref per a user request to change virtual desktop behavior
[Affects Firefox for Android]: no
[Suggested wording]: Added a new pref browser.sessionstore.restore_windows_to_virtual_desktop that, when set to false, will make previous session windows restore on the current virtual desktop instead of the virtual desktop they were on when the session was ended. This was added per a user request.
[Links (documentation, blog post, etc)]: (SUMO page, but it's not live yet so I don't know if we want to link to it): https://support.mozilla.org/en-US/kb/control-how-firefox-uses-multiple-desktops-windows

relnote-firefox: --- → ?

Merged with the relnote request in bug 1994825 and reworded for end-users with this text:

Improved control over Firefox windows on multiple desktops:
Firefox now offers new preferences to customize how windows and tabs open or restore across virtual desktops, giving you more flexibility when using multiple desktops. Learn more

Depends on: 1812489

Note added in the end only to our Nightly release notes for 145.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: