diff --git a/src/input/cursor.cpp b/src/input/cursor.cpp index 3cde39768..fa413d6e7 100644 --- a/src/input/cursor.cpp +++ b/src/input/cursor.cpp @@ -377,3 +377,7 @@ void Cursor::set_image(const std::string name) { current_image = name; } } + +void Cursor::reload_image() { + wlr_xcursor_manager_set_cursor_image(cursor_mgr, current_image.c_str(), cursor); +} diff --git a/src/input/cursor.hpp b/src/input/cursor.hpp index 8e7c8cf0c..9e23b2216 100644 --- a/src/input/cursor.hpp +++ b/src/input/cursor.hpp @@ -59,6 +59,7 @@ class Cursor { void reset_mode(); void warp_to_constraint(PointerConstraint& constraint); void set_image(const std::string name); + void reload_image(); }; #endif diff --git a/src/server.cpp b/src/server.cpp index 3e97b7b4b..def82c366 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -309,6 +309,15 @@ void output_manager_apply_notify(wl_listener* listener, void* data) { output.scene_output = nullptr; } } + + wlr_output_configuration_v1_send_succeeded(&config); + wlr_output_configuration_v1_destroy(&config); + + for (auto* output : server.outputs) { + wlr_xcursor_manager_load(server.seat->cursor.cursor_mgr, output->wlr->scale); + } + + server.seat->cursor.reload_image(); } Server::Server() : listeners(*this) {