mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Make wlr_output_transform_* functions public, refactoring
This commit is contained in:
parent
f4754ad1a2
commit
6a69b4419f
7 changed files with 69 additions and 70 deletions
|
|
@ -569,8 +569,7 @@ static bool wlr_drm_connector_set_cursor(struct wlr_output *output,
|
|||
enum wl_output_transform transform =
|
||||
wlr_output_transform_invert(output->transform);
|
||||
struct wlr_box transformed_hotspot;
|
||||
wlr_output_transform_apply_to_box(transform, &hotspot,
|
||||
&transformed_hotspot);
|
||||
wlr_box_transform(&hotspot, transform, &transformed_hotspot);
|
||||
plane->cursor_hotspot_x = transformed_hotspot.x;
|
||||
plane->cursor_hotspot_y = transformed_hotspot.y;
|
||||
|
||||
|
|
@ -632,7 +631,7 @@ static bool wlr_drm_connector_move_cursor(struct wlr_output *output,
|
|||
enum wl_output_transform transform =
|
||||
wlr_output_transform_invert(output->transform);
|
||||
struct wlr_box transformed_box;
|
||||
wlr_output_transform_apply_to_box(transform, &box, &transformed_box);
|
||||
wlr_box_transform(&box, transform, &transformed_box);
|
||||
|
||||
transformed_box.x -= plane->cursor_hotspot_x;
|
||||
transformed_box.y -= plane->cursor_hotspot_y;
|
||||
|
|
|
|||
|
|
@ -55,9 +55,8 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
|
|||
box.x = wl_fixed_to_int(surface_x);
|
||||
box.y = wl_fixed_to_int(surface_y);
|
||||
struct wlr_box transformed;
|
||||
wlr_output_transform_apply_to_box(
|
||||
wlr_wl_pointer->current_output->wlr_output.transform, &box,
|
||||
&transformed);
|
||||
wlr_box_transform(&box,
|
||||
wlr_wl_pointer->current_output->wlr_output.transform, &transformed);
|
||||
|
||||
struct wlr_event_pointer_motion_absolute wlr_event;
|
||||
wlr_event.device = dev;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue