[upstream] Maximized window becomes a mess at next startup after manually choosing to restore previous session
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mozilla Firefox |
Invalid
|
Unknown
|
|||
firefox (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Checked on both current and new user. This behavior is observed only if "Restore previous session" is not enabled to occur automatically at startup.
1) Ubuntu 20.04.2 LTS
2) 91.0+build2-
3) "Restore previous session" should not change window settings and appearance
4) "Restore previous session" drastically changes window settings and appearance in a very unpleasant way
Steps to reproduce:
1) Don't have "Restore previous session" enabled in Settings > General > Startup
2) Browse some sites
3) Close the window and confirm your desire to close it
4) Reopen Firefox
5) Go to History and select "Restore previous session"
6) The window will break apart as a result
Screenshot below.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: firefox 91.0+build2-
ProcVersionSign
Uname: Linux 5.11.0-27-generic x86_64
AddonCompatChec
ApportVersion: 2.20.11-
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
BuildID: 20210804193234
CasperMD5CheckR
Channel: Unavailable
CurrentDesktop: XFCE
Date: Fri Aug 20 23:27:25 2021
DefaultProfileE
DefaultProfileI
DefaultProfileL
DefaultProfileP
DefaultProfileT
ForcedLayersAccel: False
InstallationDate: Installed on 2021-05-17 (95 days ago)
InstallationMedia: Xubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
IpRoute:
default via 192.168.1.1 dev wlo1 proto dhcp metric 600
169.254.0.0/16 dev wlo1 scope link metric 1000
192.168.1.0/24 dev wlo1 proto kernel scope link src 192.168.1.102 metric 600
Profile0Extensions: extensions.sqlite corrupt or missing
Profile0Incompa
Profile0Locales: extensions.sqlite corrupt or missing
Profile0PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/
Profile0PrefSou
Profile0Themes: extensions.sqlite corrupt or missing
Profiles:
Profile1 (Default) - LastVersion=
Profile0 - LastVersion=
RunningIncompat
SourcePackage: firefox
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/18/2014
dmi.bios.release: 15.54
dmi.bios.vendor: Insyde
dmi.bios.version: F.36
dmi.board.
dmi.board.name: 220D
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 86.49
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.
dmi.ec.
dmi.modalias: dmi:bvnInsyde:
dmi.product.family: 103C_5335KV G=N L=CON B=HP S=PAV
dmi.product.name: HP 14 Notebook PC
dmi.product.sku: L8N69PA#UUF
dmi.product.
dmi.sys.vendor: Hewlett-Packard
description: | updated |
summary: |
- Maximized window becomes a mess at next start-up after manually choosing + Maximized window becomes a mess at next startup after manually choosing to restore previous session |
Changed in firefox: | |
status: | Unknown → New |
Changed in firefox: | |
status: | New → Invalid |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
Steps to reproduce:
For the past few major firefox versions (at least) I've been experiencing an issue on Linux whereby when opening firefox (which I always use maximised and with session-restore enabled) the window frame ends up maximised, but with the window content (including titlebar elements) incorrectly drawn and positioned using the un-maximised window dimensions.
To be clear, this is not just a content drawing issue, it's a positioning issue also - the actual window min/max/close buttons, for instance, are positioned according to the un-maximised window width from the left side of the screen.
This typically if not exclusively seems to happen when I `alt+tab` away to a different app during loading of firefox, or at least it is more likely to re-occur if I do that.
I'm using Debian Sid, with Gnome & Wayland. I have a HiDPI screen.
This seems related to #1388670, possibly a duplicate, though that seems to focus on a situation with a specific setting that does not apply to me if you go by its title. This also describes the situation with webrenderer enabled (which is worse), for what that's worth.
This is also possibly related to #1454156, which itself plays a part in poor startup behaviour and the fix for which may surely play some part in fixing the problem(s).
Actual results:
The startup experience follows this pattern: Initially the window starts out maximised with a single new empty tab. It takes several seconds to process the session data (I have a lot of open tabs, in the region of 2000+). As soon as it is done with that processing, the behaviour of #1454156 is seen, i.e. the window is suddenly replaced/resized giving an un-maximised window with the restored tabs; a split second later it is then restored to maximised again.
After this silly max->unmax->max cycle the window content then sometimes is left stuck incorrectly at the un-maximised window dimensions. The details of this differ somewhat with webrenderer enabled, which I'll describe shortly in case it is of interest in fixing webrenderer bugs, especially since things are significantly worse under webrenderer. Without webrenderer the window content is simply drawn and elements positioned, using unmaximised-window dimensions, from the top left of the maximised window frame, with the remainder of the window area shown black.
A quick workaround when this happens is to either double-click the titlebar or otherwise click the maximise button, such that the window becomes un-maximised; You can then re-maximise it, following which it will then be resized correctly.
The problem typically or exclusively seems to occur when I `alt+tab` away to a different application during the firefox startup, though does not seem to reliably do so every single time. So for instance, if I turn on my computer, login, open my email application, open firefox, and just sit and wait for firefox to fully load with my restored session, it usually (or always?) does things correctly. However, if while firefox is sat processing the session data during its startup (remember, I have lots of tabs and so this takes multiple...