aboutsummaryrefslogtreecommitdiff
path: root/rootston/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/seat.c')
-rw-r--r--rootston/seat.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/rootston/seat.c b/rootston/seat.c
index 4602aad5..280443ac 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -176,6 +176,12 @@ void roots_seat_configure_cursor(struct roots_seat *seat) {
}
}
+static void seat_set_xcursor_image(struct roots_seat *seat, struct
+ wlr_xcursor_image *image) {
+ wlr_cursor_set_image(seat->cursor->cursor, image->buffer, image->width,
+ image->width, image->height, image->hotspot_x, image->hotspot_y, 0);
+}
+
static void roots_seat_init_cursor(struct roots_seat *seat) {
seat->cursor = roots_cursor_create(seat);
if (!seat->cursor) {
@@ -204,8 +210,7 @@ static void roots_seat_init_cursor(struct roots_seat *seat) {
}
struct wlr_xcursor_image *image = xcursor->images[0];
- wlr_cursor_set_image(seat->cursor->cursor, image->buffer, image->width,
- image->width, image->height, image->hotspot_x, image->hotspot_y);
+ seat_set_xcursor_image(seat, image);
// XXX: xwayland will always have the theme of the last created seat
if (seat->input->server->desktop->xwayland != NULL) {
@@ -471,10 +476,10 @@ void roots_seat_remove_device(struct roots_seat *seat,
}
void roots_seat_configure_xcursor(struct roots_seat *seat) {
- struct wlr_xcursor *xcursor = get_default_xcursor(seat->cursor->xcursor_theme);
+ struct wlr_xcursor *xcursor =
+ get_default_xcursor(seat->cursor->xcursor_theme);
struct wlr_xcursor_image *image = xcursor->images[0];
- wlr_cursor_set_image(seat->cursor->cursor, image->buffer, image->width,
- image->width, image->height, image->hotspot_x, image->hotspot_y);
+ seat_set_xcursor_image(seat, image);
wlr_cursor_warp(seat->cursor->cursor, NULL, seat->cursor->cursor->x,
seat->cursor->cursor->y);
@@ -537,12 +542,6 @@ void roots_seat_focus_view(struct roots_seat *seat, struct roots_view *view) {
wlr_seat_keyboard_notify_enter(seat->seat, view->wlr_surface);
}
-static void seat_set_xcursor_image(struct roots_seat *seat, struct
- wlr_xcursor_image *image) {
- wlr_cursor_set_image(seat->cursor->cursor, image->buffer, image->width,
- image->width, image->height, image->hotspot_x, image->hotspot_y);
-}
-
void roots_seat_begin_move(struct roots_seat *seat, struct roots_view *view) {
struct roots_cursor *cursor = seat->cursor;
cursor->mode = ROOTS_CURSOR_MOVE;