From 19d05d3ae0eb2545986c275341250845c84f0f30 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Tue, 6 Aug 2019 05:33:06 -0400 Subject: [PATCH] config/output: rebase cursors after config applied When applying an output config, an output may transform or be altered in some way that effects the cursor. In order for the cursor images to be updated properly, all cursors need to be rebased after applying output configs. --- sway/config/output.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sway/config/output.c b/sway/config/output.c index c41670d55..a96007fbd 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -5,9 +5,11 @@ #include #include #include +#include #include #include #include "sway/config.h" +#include "sway/input/cursor.h" #include "sway/output.h" #include "sway/tree/root.h" #include "log.h" @@ -455,6 +457,12 @@ void apply_output_config_to_outputs(struct output_config *oc) { } } } + + struct sway_seat *seat; + wl_list_for_each(seat, &server.input->seats, link) { + wlr_seat_pointer_clear_focus(seat->wlr_seat); + cursor_rebase(seat->cursor); + } } void reset_outputs(void) {