aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/wlr_cursor.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c
index 93ba3478..af977632 100644
--- a/types/wlr_cursor.c
+++ b/types/wlr_cursor.c
@@ -85,16 +85,20 @@ void wlr_cursor_move(struct wlr_cursor *cur, double delta_x, double delta_y) {
hotspot_y = image->hotspot_y;
}
- struct wlr_output *output;
- output = wlr_output_layout_output_at(cur->state->layout, new_x, new_y);
-
- if (output) {
- int output_x = new_x;
- int output_y = new_y;
-
- // TODO fix double to int rounding issues
- wlr_output_layout_output_coords(cur->state->layout, output, &output_x, &output_y);
- wlr_output_move_cursor(output, output_x - hotspot_x, output_y - hotspot_y);
+ if (wlr_output_layout_output_at(cur->state->layout, new_x, new_y)) {
+ //struct wlr_output *output;
+ //output = wlr_output_layout_output_at(cur->state->layout, new_x, new_y);
+ struct wlr_output_layout_output *l_output;
+ wl_list_for_each(l_output, &cur->state->layout->outputs, link) {
+ int output_x = new_x;
+ int output_y = new_y;
+
+ // TODO fix double to int rounding issues
+ wlr_output_layout_output_coords(cur->state->layout,
+ l_output->output, &output_x, &output_y);
+ wlr_output_move_cursor(l_output->output, output_x - hotspot_x,
+ output_y - hotspot_y);
+ }
cur->x = new_x;
cur->y = new_y;