diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-12-15 11:04:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-15 11:04:27 -0500 |
commit | a6704fd16d53fb82c8cea527b4a546ba92572ea8 (patch) | |
tree | 4ef0a8c88272e7715f6f2b6fd2da853850de328c /backend | |
parent | 23fb663ea4eaff436d9bfab7f74cdd298fac44c5 (diff) | |
parent | 51bbcc0fbf7b668c73eeffbb6839f402a0ca368f (diff) |
Merge pull request #488 from emersion/fractional-scaling
Add fractional scaling support
Diffstat (limited to 'backend')
-rw-r--r-- | backend/wayland/wl_seat.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c index 9fcc48dd..0d4ebc8d 100644 --- a/backend/wayland/wl_seat.c +++ b/backend/wayland/wl_seat.c @@ -59,14 +59,15 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer, &box.width, &box.height); box.x = wl_fixed_to_int(surface_x); box.y = wl_fixed_to_int(surface_y); - struct wlr_box transformed; + struct wlr_box transformed; wlr_box_transform(&box, wlr_output->transform, &transformed); - box.x /= wlr_output->scale; - box.y /= wlr_output->scale; + transformed.x /= wlr_output->scale; + transformed.y /= wlr_output->scale; struct wlr_box layout_box; - wlr_wl_output_layout_get_box(wlr_wl_pointer->current_output->backend, &layout_box); + wlr_wl_output_layout_get_box(wlr_wl_pointer->current_output->backend, + &layout_box); struct wlr_event_pointer_motion_absolute wlr_event; wlr_event.device = dev; |