aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2019-08-06 05:33:06 -0400
committerFurkan Sahin <furkan-dev@proton.me>2019-08-06 05:33:06 -0400
commit9c0f68f88c847a0476f5b912be3bccd13c707301 (patch)
tree901a7bb3efc52c38fd6c9e72d64ab0eace48e4f7
parent7be8ff66deeae55811b4f0395082f23f33967348 (diff)
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.
-rw-r--r--sway/config/output.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/config/output.c b/sway/config/output.c
index c41670d5..a96007fb 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -5,9 +5,11 @@
#include <sys/socket.h>
#include <sys/wait.h>
#include <unistd.h>
+#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output.h>
#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) {