aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-12-04 19:34:35 +0100
committerSimon Ser <contact@emersion.fr>2020-12-04 19:34:35 +0100
commit1336ad2a23bfe5a76c161c5985d99e6f4b127931 (patch)
treec267a380e0124dfd0cf175be98c8ee902873dd7d /backend
parent0e927533b007959a13f81107babc00fe5272871b (diff)
backend/drm: remove unused if in drm_connector_move_cursor
We return early if we don't have a plane.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index f797dd5a..7c88fd9e 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1008,10 +1008,8 @@ static bool drm_connector_move_cursor(struct wlr_output *output,
wlr_output_transform_invert(output->transform);
wlr_box_transform(&box, &box, transform, width, height);
- if (plane != NULL) {
- box.x -= plane->cursor_hotspot_x;
- box.y -= plane->cursor_hotspot_y;
- }
+ box.x -= plane->cursor_hotspot_x;
+ box.y -= plane->cursor_hotspot_y;
conn->cursor_x = box.x;
conn->cursor_y = box.y;