wayland/xdg-shell: Warn on invalid effective geometry
It isn't allowed to provide empty window geometries; warn if a client violates this. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1557>
This commit is contained in:
parent
a54970805d
commit
a40ab5650b
@ -1590,6 +1590,15 @@ meta_wayland_xdg_surface_post_apply_state (MetaWaylandSurfaceRole *surface_role
|
||||
meta_wayland_shell_surface_determine_geometry (shell_surface,
|
||||
&pending->new_geometry,
|
||||
&priv->geometry);
|
||||
if (priv->geometry.width == 0 || priv->geometry.height == 0)
|
||||
{
|
||||
g_warning ("Invalid window geometry for xdg_surface@%d. Ignoring "
|
||||
"for now, but this will result in client termination "
|
||||
"in the future.",
|
||||
wl_resource_get_id (priv->resource));
|
||||
return;
|
||||
}
|
||||
|
||||
priv->has_set_geometry = TRUE;
|
||||
}
|
||||
else if (!priv->has_set_geometry)
|
||||
|
Loading…
Reference in New Issue
Block a user