From: tokyo4j Date: Sun, 30 Mar 2025 07:09:39 +0000 (+0900) Subject: magnifier: show magnifier only in one output X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=3f56814497dc63440663afd2e52730763367dbec;p=proto%2Flabwc.git 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. --- 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; }