From 3f56814497dc63440663afd2e52730763367dbec Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Sun, 30 Mar 2025 16:09:39 +0900 Subject: [PATCH] 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. --- src/magnifier.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/magnifier.c b/src/magnifier.c index 0b2da20b..e1b3fcd9 100644 --- a/src/magnifier.c +++ b/src/magnifier.c @@ -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; } -- 2.52.0