|
|
@ -459,6 +459,11 @@ static void surface_set_buffer_transform(struct wl_client *client,
|
|
|
|
static void surface_set_buffer_scale(struct wl_client *client,
|
|
|
|
static void surface_set_buffer_scale(struct wl_client *client,
|
|
|
|
struct wl_resource *resource,
|
|
|
|
struct wl_resource *resource,
|
|
|
|
int32_t scale) {
|
|
|
|
int32_t scale) {
|
|
|
|
|
|
|
|
if (scale <= 0) {
|
|
|
|
|
|
|
|
wl_resource_post_error(resource, WL_SURFACE_ERROR_INVALID_SCALE,
|
|
|
|
|
|
|
|
"Specified scale value (%d) is not positive", scale);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
struct wlr_surface *surface = wlr_surface_from_resource(resource);
|
|
|
|
struct wlr_surface *surface = wlr_surface_from_resource(resource);
|
|
|
|
surface->pending.committed |= WLR_SURFACE_STATE_SCALE;
|
|
|
|
surface->pending.committed |= WLR_SURFACE_STATE_SCALE;
|
|
|
|
surface->pending.scale = scale;
|
|
|
|
surface->pending.scale = scale;
|
|
|
|