mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Damage tracking for transformed outputs
This commit is contained in:
parent
a98ece68d3
commit
ece2c1e4e2
12 changed files with 185 additions and 154 deletions
|
|
@ -54,14 +54,16 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
|
|||
|
||||
struct wlr_output *wlr_output = &wlr_wl_pointer->current_output->wlr_output;
|
||||
|
||||
struct wlr_box box;
|
||||
int width, height;
|
||||
wl_egl_window_get_attached_size(wlr_wl_pointer->current_output->egl_window,
|
||||
&box.width, &box.height);
|
||||
box.x = wl_fixed_to_int(surface_x);
|
||||
box.y = wl_fixed_to_int(surface_y);
|
||||
&width, &height);
|
||||
|
||||
struct wlr_box box = {
|
||||
.x = wl_fixed_to_int(surface_x),
|
||||
.y = wl_fixed_to_int(surface_y),
|
||||
};
|
||||
struct wlr_box transformed;
|
||||
wlr_box_transform(&box, wlr_output->transform, &transformed);
|
||||
wlr_box_transform(&box, wlr_output->transform, width, height, &transformed);
|
||||
transformed.x /= wlr_output->scale;
|
||||
transformed.y /= wlr_output->scale;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue