aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c6
-rw-r--r--backend/wayland/output.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 26cf99df..06a58d50 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -915,10 +915,8 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
plane->cursor_enabled = false;
if (texture != NULL) {
- int width, height;
- wlr_texture_get_size(texture, &width, &height);
- width = width * output->scale / scale;
- height = height * output->scale / scale;
+ int width = texture->width * output->scale / scale;
+ int height = texture->height * output->scale / scale;
if (width > (int)plane->surf.width || height > (int)plane->surf.height) {
wlr_drm_conn_log(conn, WLR_ERROR, "Cursor too large (max %dx%d)",
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index db9056d5..6bc84dcb 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -402,10 +402,8 @@ static bool output_set_cursor(struct wlr_output *wlr_output,
struct wl_surface *surface = output->cursor.surface;
if (texture != NULL) {
- int width, height;
- wlr_texture_get_size(texture, &width, &height);
- width = width * wlr_output->scale / scale;
- height = height * wlr_output->scale / scale;
+ int width = texture->width * wlr_output->scale / scale;
+ int height = texture->height * wlr_output->scale / scale;
if (output->cursor.swapchain == NULL ||
output->cursor.swapchain->width != width ||