session-lock-v1: drop negative buffer size checks

The buffer size will never be negative, and the negative checks
are distracting from the real checks here.
This commit is contained in:
Simon Ser 2023-12-25 18:54:11 +01:00
parent dc3b2b9439
commit aa32d1a127
1 changed files with 1 additions and 2 deletions

View File

@ -170,8 +170,7 @@ static void lock_surface_role_commit(struct wlr_surface *surface) {
return;
}
if (surface->current.width < 0 || surface->current.height < 0 ||
(uint32_t)surface->current.width != lock_surface->pending.width ||
if ((uint32_t)surface->current.width != lock_surface->pending.width ||
(uint32_t)surface->current.height != lock_surface->pending.height) {
wl_resource_post_error(lock_surface->resource,
EXT_SESSION_LOCK_SURFACE_V1_ERROR_DIMENSIONS_MISMATCH,