wayland: Bail loudly if invalid geometry is set

There is some bug somewhere where the geometry ends up being correct.
Mutter didn't handle this gracefully, and is to be changed to simply
respect the protocol and error out the client that sends bogus data.

Prepare for this by instead of sending bogus data, complain loudly if it
would happen dropping the invalid geometry on the floor instead of
sending it.

Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/1527
This commit is contained in:
Jonas Ådahl
2020-11-11 10:17:59 +01:00
parent cfd21b0991
commit ba31560970

View File

@@ -1349,6 +1349,9 @@ gdk_wayland_window_sync_margin (GdkWindow *window)
return;
gdk_wayland_window_get_window_geometry (window, &geometry);
g_return_if_fail (geometry.width > 0 && geometry.height > 0);
gdk_window_set_geometry_hints (window,
&impl->geometry_hints,
impl->geometry_mask);