mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
wayland/surface: Disable WL_SURFACE_ERROR_INVALID_SIZE check again
The check was introduces in ab17c98c94
but turned out to trigger client crashes in common cases.
Turn it into a warning for now until clients are fixed.
Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/2083
Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/2163
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2335>
This commit is contained in:
parent
0280b0aaa5
commit
f9857cb8bd
@ -791,12 +791,16 @@ meta_wayland_surface_apply_state (MetaWaylandSurface *surface,
|
|||||||
if ((get_buffer_width (surface) % surface->scale != 0) ||
|
if ((get_buffer_width (surface) % surface->scale != 0) ||
|
||||||
(get_buffer_height (surface) % surface->scale != 0))
|
(get_buffer_height (surface) % surface->scale != 0))
|
||||||
{
|
{
|
||||||
wl_resource_post_error (surface->resource, WL_SURFACE_ERROR_INVALID_SIZE,
|
struct wl_resource *resource = surface->resource;
|
||||||
"Buffer size (%dx%d) must be an integer multiple "
|
pid_t pid;
|
||||||
"of the buffer_scale (%d)",
|
|
||||||
get_buffer_width (surface),
|
wl_client_get_credentials (wl_resource_get_client (resource), &pid, NULL,
|
||||||
get_buffer_height (surface), surface->scale);
|
NULL);
|
||||||
goto cleanup;
|
|
||||||
|
g_warning ("Bug in client with pid %ld: Buffer size (%dx%d) is not an"
|
||||||
|
"integer multiple of the buffer_scale (%d).", (long) pid,
|
||||||
|
get_buffer_width (surface), get_buffer_height (surface),
|
||||||
|
surface->scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->has_new_buffer_transform)
|
if (state->has_new_buffer_transform)
|
||||||
|
Loading…
Reference in New Issue
Block a user