magnifier: show magnifier only in one output

This may slightly degrade UX, but this prevents the temporary buffer from
being reallocated for every frame when the magnifier spans multiple
outputs with different scales/transforms.
This commit is contained in:
tokyo4j 2025-03-30 16:09:39 +09:00 committed by Johan Malm
parent 6dc8e279ec
commit 3f56814497

View file

@ -57,9 +57,8 @@ magnifier_draw(struct output *output, struct wlr_buffer *output_buffer, struct w
};
box_logical_to_physical(&cursor_pos, output->wlr_output);
bool cursor_in_output = wlr_box_contains_point(&output_box,
cursor_pos.x, cursor_pos.y);
if (fullscreen && !cursor_in_output) {
if (!wlr_box_contains_point(&output_box,
cursor_pos.x, cursor_pos.y)) {
return;
}