This gives instant feedback when changing cursor theme or size.
It only works for server side cursors or clients using the
cursor-shape protocol.
Fixes: #1619
void cursor_update_image(struct seat *seat);
void cursor_init(struct seat *seat);
-void cursor_load(struct seat *seat);
+void cursor_reload(struct seat *seat);
void cursor_emulate_move_absolute(struct seat *seat,
struct wlr_input_device *device,
double x, double y, uint32_t time_msec);
*/
if (seat->seat->pointer_state.focused_surface) {
seat->server_cursor = LAB_CURSOR_DEFAULT;
+ wlr_cursor_set_xcursor(seat->cursor, seat->xcursor_manager, "");
cursor_update_focus(seat->server);
}
return;
wlr_seat_pointer_notify_frame(seat->seat);
}
-void
+static void
cursor_load(struct seat *seat)
{
const char *xcursor_theme = getenv("XCURSOR_THEME");
}
}
+void
+cursor_reload(struct seat *seat)
+{
+ cursor_load(seat);
+ cursor_update_image(seat);
+}
+
void
cursor_init(struct seat *seat)
{
{
struct seat *seat = &server->seat;
struct input *input;
- cursor_load(seat);
+ cursor_reload(seat);
overlay_reconfigure(seat);
wl_list_for_each(input, &seat->inputs, link) {
switch (input->wlr_input_device->type) {