Fedora 32: Firefox resize fails after start
Downstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1623658#c15
Looks like when window_resize and window_maximize is called, window_maximize can be ignored due to timing.
This is clearly reproducible on Fedora 32 with Firefox 74 builds on Wayland (builds https://koji.fedoraproject.org/koji/buildinfo?buildID=1478931)
For Wayland/Gtk log see https://bugzilla.mozilla.org/show_bug.cgi?id=1623658#c15
There are related parts of the log:
[(null) 69383: Main Thread]: D/Widget nsWindow::Resize [0x7f3d1f59c000] 960 1020
[(null) 69383: Main Thread]: D/Widget nsWindow::ResizeInt [0x7f3d1f59c000] 0 0 -> 1920 2040 repaint 0
[(null) 69383: Main Thread]: D/Widget nsWindow::NativeResize [0x7f3d1f59c000] 960 1020
[(null) 69383: Main Thread]: D/Widget nsWindow::SetSizeMode [0x7f3d1f59c000] 2
[(null) 69383: Main Thread]: D/Widget set maximized
[Parent 69383: Main Thread]: D/Widget nsWindow::SetSizeMode [0x7f3d1f59c000] 2
[Parent 69383: Main Thread]: D/Widget set maximized
[Parent 69383: Main Thread]: D/Widget nsWindow::Show [0x7f3d1f59c000] state 1
[3602866.101] -> wl_surface@46.frame(new id wl_callback@49)
[3602866.159] -> xdg_wm_base@24.get_xdg_surface(new id xdg_surface@50, wl_surface@46)
[3602866.171] -> xdg_surface@50.get_toplevel(new id xdg_toplevel@51)
[3602866.179] -> xdg_toplevel@51.set_parent(nil)
[3602866.185] -> xdg_toplevel@51.set_title("Mozilla Firefox")
[3602866.190] -> xdg_toplevel@51.set_maximized()
[3602866.195] -> xdg_toplevel@51.set_app_id("firefox")
[3602866.201] -> gtk_shell1@15.get_gtk_surface(new id gtk_surface1@52, wl_surface@46)
[3602866.211] -> xdg_toplevel@51.set_min_size(398, 43)
[3602866.219] -> xdg_toplevel@51.set_max_size(16331, 16331)
[3602866.228] -> gtk_surface1@52.unset_modal()
[3602866.232] -> wl_surface@46.commit()
[3602923.562] xdg_toplevel@51.configure(1920, 1020, array)
[3602923.583] xdg_surface@50.configure(479)
[3602923.594] -> wl_surface@46.set_buffer_scale(2)
[3602923.614] -> xdg_surface@50.ack_configure(479)
[3603060.448] -> xdg_toplevel@51.set_maximized()
[Parent 69383: Main Thread]: D/Widget configure event [0x7f3d1f59c000] 0 0 1972 1072
[Parent 69383: Main Thread]: D/Widget moz_container_size_allocate [0x7f3d2090a090] 0,0 -> 1972 x 1072
[Parent 69383: Main Thread]: D/Widget nsWindow::OnSizeAllocate [0x7f3d1f59c000] 0,0 -> 1972 x 1072
[Parent 69383: Main Thread]: D/Widget configure event [0x7f3d1f59c000] 0 0 1920 1020
[Parent 69383: Main Thread]: D/Widget configure event [0x7f3d1f59c000] 0 0 960 1020
[Parent 69383: Main Thread]: D/Widget moz_container_size_allocate [0x7f3d2090a090] 0,0 -> 960 x 1020
[Parent 69383: Main Thread]: D/Widget nsWindow::OnSizeAllocate [0x7f3d1f59c000] 0,0 -> 960 x 1020
[3603086.731] -> wl_shm@5.create_pool(new id wl_shm_pool@62, fd 84, 15667200)
[3603086.760] -> wl_shm_pool@62.create_buffer(new id wl_buffer@63, 0, 1920, 2040, 7680, 0)
...
[3603096.226] -> wl_surface@46.set_buffer_scale(2)
[3603096.265] -> xdg_surface@50.set_window_geometry(0, 0, 960, 1020)
From the log it looks like Gtk/Mutter creates maximized window, then child widget is resized to 1972 1072 (why?) and then shrank to 960, 1020 as previous (saved) size before Maximize. Firefox does not get any info that the window it not maximized (we don't get window state event).
The log comes from run where Firefox does not fiddle with wayland subsurfaces, everything here comes from Gtk and it's wayland surfaces/buffers owned by Gtk.
This is Fedora 32 only. I can't reproduce it with Fedora 31 with the same Firefox and Gtk version.
Full log with gtk only wayland interaction: run-gtk-only.txt