Comment 0 for bug 2069766

Revision history for this message
Frank Praznik (praznifm) wrote :

Ubuntu 24.04 with Wayland

A bug was reported to SDL regarding a client app sporadically not getting the correct dimensions when entering fullscreen. The original report is here: https://github.com/libsdl-org/SDL/issues/9999

The client application is initially creating a non-resizable window, then entering fullscreen. In this case, SDL first removes any min/max limits, commits, then makes the fullscreen request. The issues is that sometimes the corresponding configuration event contains the correct fullscreen dimensions, and other times it sends the old, constrained dimensions.

The full output of WAYLAND_DEBUG=1 is attached, but the relevant bit in a failure scenario is here:

[1653593.718] -> xdg_toplevel@54.set_min_size(0, 0)
[1653593.720] -> xdg_toplevel@54.set_max_size(0, 0)
[1653593.723] -> xdg_surface@58.set_window_geometry(0, -24, 1280, 744)
[1653593.726] -> wl_surface@51.commit()
[1653593.729] -> xdg_toplevel@54.set_fullscreen(wl_output@6)
[1653593.732] -> wl_display@1.sync(new id wl_callback@68)
[1653593.741] -> wl_display@1.sync(new id wl_callback@67)
[1653595.811] wl_display@1.delete_id(55)
[1653595.836] wl_display@1.delete_id(68)
[1653595.840] wl_display@1.delete_id(67)
[1653595.843] xdg_toplevel@54.configure_bounds(1920, 1048)
[1653595.846] xdg_toplevel@54.configure(1280, 744, array[8])
[1653595.850] xdg_surface@58.configure(6768)
[1653595.864] -> wp_viewport@52.set_destination(1280, 744)
[1653595.868] -> wl_compositor@4.create_region(new id wl_region@55)
[1653595.871] -> wl_region@55.add(0, 0, 1280, 744)
[1653595.875] -> wl_surface@51.set_opaque_region(wl_region@55)
[1653595.878] -> wl_region@55.destroy()
[1653595.883] -> wl_surface@59.attach(nil, 0, 0)
[1653595.886] -> wl_surface@59.commit()
[1653595.889] -> wl_surface@63.attach(nil, 0, 0)
[1653595.892] -> wl_surface@63.commit()
[1653595.895] -> xdg_surface@58.set_window_geometry(0, 0, 1280, 744)
[1653595.898] -> xdg_surface@58.ack_configure(6768)

The constraints are zeroed and the changes are the committed, but the old size is being sent in the fullscreen configuration event. SDL is respecting the reported fullscreen bounds, as it should. If the window is created as resizable and no constraints are ever set, this does not occur.

I'm reporting this here as Ubuntu 24.04 is the only report we've had on this matter, and I've never been able to replicate it on upstream GNOME/Mutter.