mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 07:02:28 +00:00
viewporter: fix "has buffer" check
Previously, cases when a viewport source box was updated without attaching a buffer weren't checked for correctness properly because the state's buffer would be NULL. Use wlr_surface_state_has_buffer() instead.
This commit is contained in:
parent
538a7a190d
commit
072f6ed977
@ -158,7 +158,7 @@ static void viewport_handle_surface_client_commit(struct wl_listener *listener,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->viewport.has_src && state->buffer != NULL &&
|
if (state->viewport.has_src && wlr_surface_state_has_buffer(state) &&
|
||||||
!check_src_buffer_bounds(state)) {
|
!check_src_buffer_bounds(state)) {
|
||||||
wlr_surface_reject_pending(viewport->surface,
|
wlr_surface_reject_pending(viewport->surface,
|
||||||
viewport->resource, WP_VIEWPORT_ERROR_OUT_OF_BUFFER,
|
viewport->resource, WP_VIEWPORT_ERROR_OUT_OF_BUFFER,
|
||||||
|
Loading…
Reference in New Issue
Block a user