Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1815127 - F32 wayland Firefox build can't open maximized - wrong resize from gtk_surface1
Summary: F32 wayland Firefox build can't open maximized - wrong resize from gtk_surface1
Status: CLOSED DUPLICATE of bug 1821702
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk3
Version: 32
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
: 1822757 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2020-03-19 14:42 UTC by Matthew Bunt
Modified: 2020-04-09 19:26 UTC (History)
23 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-09 19:26:00 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Mozilla Foundation 1623658 0 P2 RESOLVED [Wayland] Firefox is resized on background 2020-04-09 19:23:34 UTC

Description Matthew Bunt 2020-03-19 14:42:47 UTC
Description of problem:
Firefox wayland build always starts in a smallish window. It can be maximized but next time it opens it will be in the same small window. You can edit the xulstore.json file to set the max size for your monitor, but if you don't leave firefox in that exact position then it will reset to the size to the same smallish window.

It's a minor problem, but incredibly annoying to have to adjust Firefox every time it opens.

Version-Release number of selected component (if applicable):
Firefox 74.0.5

How reproducible:

Steps to Reproduce:
1. Update to F32 (I suspect it would happen on a fresh install too, but I'm not sure and have not tested)
2. Open Firefox, it will not be maximized
3. Maximize Firefox
4. Close Firefox
5. Open Firefox and it won't be maximized again

Actual results:
Firefox resets its size and position after you close it

Expected results:
Firefox should remember its window size and position. This has been the default behavior on every version of Fedora in the past and on all other operating systems.

Additional info:
I know applications cant tell wayland, start in x,y coordinates. However they should be able to remember window size and if it is maximized or not because that is how Nautilus behaves.

This issue also effected Firefox on my Windows machine because I have Firefox Sync enabled and I had to fix that following the process in this reddit thread:

Comment 1 Martin Stransky 2020-03-19 14:45:27 UTC
Please check this build:
You may also need a new nss for it.

Comment 2 Matthew Bunt 2020-03-19 15:42:54 UTC
I installed firefox 74.0.11 as requested and the issue persists. However I did discover something new.

If you change the size of the window and close it while not maximized, xulstore.json will show that window size and sizemode will be set to normal. When xulstore.json is in this state firefox opens correctly. The size specified in the file matches the window size and is non maximized.

If you maximize firefox and close it, xulstore.json will still have the same window dimensions as before, but the sizemode will now be set to maximized. When you open firefox in this state the resulting window is the size specified in the xulstore.json, but I believe this is actually a visual glitch and the window is really maximized but displaying incorrectly. I think this because if you drag the firefox window it sort of snaps to maximized briefly and then shrinks to the non maximized size. This is the same animation as when you drag a maximized window down and it reverts to non maximized.

I hope this makes sense. If any clarification is needed or if you would like me to test again.

Comment 3 Martin Stransky 2020-03-19 16:14:33 UTC
I was wrong about the .11 version, seems to be fixed for X11 only.

Comment 4 Martin Stransky 2020-03-20 21:37:05 UTC
It's Bug :

It's wayland specific. Firefox is maximized on start:

[2212833.516] xdg_toplevel(1920, 1020, array)
[2212833.538] xdg_surface(1442)
[2212833.642] -> xdg_surface(1442)

but it resized on background then:

[2213074.109] gtk_surface1(array)
[2213074.115] gtk_surface1(array)
[2213074.121] xdg_toplevel(1280, 1057, array)
[2213074.133] xdg_surface(1444)
[2213074.147] -> xdg_surface(1444)

so it's switched to non-maximized state but we don't know about it because we don't get on state change event.

When this bug does not happen, the log looks like:

[4050349.721] gtk_surface1(array)
[4050349.733] gtk_surface1(array)
[4050349.743] xdg_toplevel(1920, 1020, array)
[4050349.763] xdg_surface(1613)
[4050349.806] -> xdg_surface(1613)

so looks like configure_edges() detects screen size correctly.

Comment 5 Martin Stransky 2020-03-24 15:40:57 UTC
Reported upstream here:

Comment 6 Jonas Ådahl 2020-04-03 15:17:48 UTC
Moving to gtk, as the fix is there.

Comment 7 Martin Stransky 2020-04-09 19:24:11 UTC
*** Bug 1822757 has been marked as a duplicate of this bug. ***

Comment 8 Martin Stransky 2020-04-09 19:26:00 UTC

*** This bug has been marked as a duplicate of bug 1821702 ***

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