File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1734,8 +1734,22 @@ meta_wayland_xdg_surface_post_apply_state (MetaWaylandSurfaceRole *surface_role
17341734 meta_wayland_shell_surface_determine_geometry (shell_surface ,
17351735 & pending -> new_geometry ,
17361736 & priv -> geometry );
1737+
17371738 if (priv -> geometry .width == 0 || priv -> geometry .height == 0 )
17381739 {
1740+ MetaWaylandSurface * surface =
1741+ meta_wayland_surface_role_get_surface (surface_role );
1742+
1743+ /* A client may commit window geometry before attaching its first
1744+ * buffer (e.g. answering an initial maximized configure). The
1745+ * geometry can't be resolved against an empty surface; defer
1746+ * silently until a buffer arrives rather than warning. */
1747+ if (!surface -> buffer_ref -> buffer )
1748+ {
1749+ priv -> has_set_geometry = TRUE;
1750+ return ;
1751+ }
1752+
17391753 g_warning ("Invalid window geometry for xdg_surface@%d. Ignoring "
17401754 "for now, but this will result in client termination "
17411755 "in the future." ,
You can’t perform that action at this time.
0 commit comments