mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-16 06:59:44 -05:00
rootston: add roots_xcursor_theme
roots_xcursor_theme loads multiple wlr_xcursor_theme at different scales.
This commit is contained in:
parent
ac1573b0e7
commit
aaf0691883
8 changed files with 170 additions and 77 deletions
|
|
@ -27,12 +27,6 @@ void roots_cursor_destroy(struct roots_cursor *cursor) {
|
|||
// TODO
|
||||
}
|
||||
|
||||
static void cursor_set_xcursor_image(struct roots_cursor *cursor,
|
||||
struct wlr_xcursor_image *image) {
|
||||
wlr_cursor_set_image(cursor->cursor, image->buffer, image->width,
|
||||
image->width, image->height, image->hotspot_x, image->hotspot_y, 0);
|
||||
}
|
||||
|
||||
static void roots_cursor_update_position(struct roots_cursor *cursor, uint32_t time) {
|
||||
struct roots_desktop *desktop = cursor->seat->input->server->desktop;
|
||||
struct roots_seat *seat = cursor->seat;
|
||||
|
|
@ -50,8 +44,8 @@ static void roots_cursor_update_position(struct roots_cursor *cursor, uint32_t t
|
|||
set_compositor_cursor = view_client != cursor->cursor_client;
|
||||
}
|
||||
if (set_compositor_cursor) {
|
||||
struct wlr_xcursor *xcursor = get_default_xcursor(cursor->xcursor_theme);
|
||||
cursor_set_xcursor_image(cursor, xcursor->images[0]);
|
||||
roots_xcursor_theme_set_default(desktop->xcursor_theme,
|
||||
cursor->cursor);
|
||||
cursor->cursor_client = NULL;
|
||||
}
|
||||
if (view) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue