Open Bug 686747 Opened 13 years ago Updated 2 years ago

Firefox doesn't resize in xmonad on launch in a smaller window.

Categories

(Core :: Widget: Gtk, defect, P3)

9 Branch
x86_64
Linux
defect

Tracking

()

Tracking Status
firefox57 - wontfix

People

(Reporter: mattm, Unassigned)

References

Details

Attachments

(2 files)

I start Firefox and it restores my previous browsing session.

However, occasionally (I'm having trouble consistently replicating, but occurs frequently enough) the browser window content is the old size of the window, instead of the current smaller size.

Resizing the window causes firefox to resize chrome/content correctly.
Mozilla/5.0 (X11; Linux x86_64; rv:9.0a1) Gecko/20110919 Firefox/9.0a1

Could you confirm if I got the steps right?

1) Set the "Show my window and tabs from last time" from Preferences/general.
2) Resize the window.
3) Close Firefox
4) Start Firefox-the tabs from the last session are restored.

Expected: The Firefox window size should be the same as it was before ending the previous session 

Instead, you are reporting that the window resizes to its normal position.
Steps:
Use xmonad on linux as Window Manager.

1) Open some tab in Firefox window occupying 100% of screen.
2) Crash firefox
3) Open another application
4) Open Firefox. Because of (3) and using a tiling WM, Firefox only has 50% of screen space
4) "This is embarassing..." Session Restore opens, correctly occupying the window.
5) Restore previous tab. The browser chrome and window content have their previous size, but the window itself does not.
Hello Matthew. To get "This is embarassing..." Firefox must crash 2 times in a row.
 
Well i just did that for you with Mozilla/5.0 (X11; Linux i686; rv:13.0a1) Gecko/20120215 Firefox/13.0a1 (nigthly version). I have started the browser for the 3-rd time and "This is embarassing..." message appeared and of course i had restored my session.

During the restoration i did not noticed any changes at the window size or at the content size; all my tabs where restored without any problems.

Usind a proprietary driver for your GPU might improve your experience; as an e.g. personally i did noticed this with the nouveau kernel module for Nvidia cards and the proprietary Nvidia driver.
I have the same issue with version 20.0.1: Firefox resizes correctly if it's running, but if I close it and start in on my other screen (smaller resolution) it still seems to use the resolution of the previous screen. I'm using xmonad as my WM.
I can reproduce that here.
Status: UNCONFIRMED → NEW
Ever confirmed: true
The issue is still present in 26.0
How could this be fixed?
I use xmonad and a workaround I use is by running this command after launching firefox. I'm also using pentadactyl, so I simply put it into the rc file. Usually this command would resize firefox to 0x0 dimensions but because it's in a tiling window manager that doesn't happen. Firefox just recognises there has been a window resize and adjusts itself. Also, I'm using pentadactyl, so I can get this to size correctly just by putting it in my rc file.

xdotool search --name "Firefox" windowsize 0 0
Oh dang, I repeated myself. What a fool I am ^^. I'd also like to add that this is an issue I've come across in programs other than Firefox when using xmonad (programs such as feh). So I recommend scripting this xdotool trick with each program that causes problems.
Upon further inspection, this trick doesn't seem to work every time with firefox. I hope this gets fixed.
I don't use Firefox anymore, so never **** mind!
I'm also experiencing this bug in i3wm and xmonad on Debian Wheezy. It happens whenever I close Firefox, change the number of other windows open, and open Firefox again. I've only used one window at a time so far, so I don't know if things are different with several Firefox windows.
Also happening on up-to-date Arch+Firefox with xmonad.
Seems working correctly on Gtk+ 3.
Well, it was false positive, it after all does not work even with Gtk+ 3.
Firefox 56.0 is affected by this bug on XMonad.
This bug occurs if `When Firefox Starts` is set to `Show your windows and tabs from last time`.
When it is set to `Show a blank page` or `Show your homepage`, the bug disappears.

I think firefox seems to remember and restore the size of windows and tabs from last time and forget to adapt to the actual window size on XMonad.
What about making an option, `remember the sizes of windows and tabs from last time` and having it disabled by default?
[Tracking Requested - why for this release]: Many people who use tiled window managers(i3wm, xmonad, ...) would rather use firefox rather than chrome or its derivatives like vivaldi, but this bug is annoying enough to repel us. This is the only thing that keeps tiled window manager users from adopting firefox.

This bug is simple to fix. There are at least two ways to fix this.

1) If `When Firefox Starts` is set to `Show your windows and tabs from last time`, show an option to restore the sizes of windows from last time so that tiled window manager users can disable the option.
2) Don't store and restore window sizes for everyone.
crocket: Thanks for your comments. This is a won't fix for 57. We have been living with this bug for a while and there will not be sufficient cycles to do any work in this area now.
When would it be realistic to fix this bug? firefox-59? firefox-60? Or, much later?
A timeline for this would be really useful. Its one of those papercuts that hit you at least twice a day (when hooking up work monitor, and when disconnecting again later).
Popup windows are affected by this bug, too.
I see popup windows many times a day.
Thus, it affects me often.
Even if `When Firefox Starts` is set to `Show your windows and tabs from last time`, pop-ups and/or new windows are affected by this bug.
There was a typo.

Even if `When Firefox Starts` is set to `Show your windows and tabs from last time` -->
Even if `When Firefox Starts` is not set to `Show your windows and tabs from last time`

Bayes's Theorem suggests this 8 year old bug will exist for 8 more years, but I am hoping my added voice here can improve that prognosis slightly.

For i3 window manager, I have this line in my config as a silly workaround:

for_window [class="(?i)firefox"] resize grow height 1 px or 1 ppt

I'm also on i3, but that workaround doesn't work for me because my default workspace layout is tab.

Same bug happens for me as well on i3wm (Ubuntu).

I think the bug was fixed in one of the last nightlies.

Which release will get the fix first?

I just noticed that Firefox resize correctly only if WebRender is force-disabled (gfx.webrender.force-disabled=true).

Still happens to me many times, every day.

Firefox version: 69.0.3 (64-bit)
WM: dwm

Component: General → Widget: Gtk
Product: Firefox → Core

Problem is still present in Firefox 70.0.1 on Ubuntu 18.04 (70.0.1+build1-0ubuntu0.18.04.1). What is the status?

I figured out that restoring the last session restores the previous window sizes.
Tiling window managers do not work well with applications that try to set their own window sizes for tiled windows.

Firefox should have an option to prevent itself from restoring window sizes when it restores the previous session.

I've found the following workaround (not sure which side effects come with this):
about:config -> privacy.resistFingerprinting = true

Firefox version: 76.0.1 (64-bit)
WM: dwm-6.2

Priority: -- → P3

Setting privacy.resistFingerprinting to true fixes this for me! I'm running on Fedora 32 and i3wm, and this

Setting privacy.resistFingerprinting to true fixes this for me! The bug was otherwise 100% reproducible whenever closing firefox & reopening it in a different window size.

Firefox version 80.0.1
WM: i3 version 4.18.2 on Fedora 32

Also a bug in herbstluftwm. Can confirm that privacy.resistFingerprinting=True fixes it. However, I don't want to set it to True because it has negative sideeffects. Please fix this decade old issue.

11 years and counting. Both Vimium and Tridactyl (Vim bindings for Firefox) requires privacy.resistFingerprinting=False for their smooth scrolling to work properly. This means that the workaround will break workflows for those who uses Vimium or Tridactyl.

Severity: normal → S3

Also a bug in BSPWM, and I agree that setting privacy.resistFingerprinting=True is not a solution as it does have undesired effects.

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

Attachment

General

Created:
Updated:
Size: