diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-12 17:10:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-12 17:10:11 -0500 |
commit | 855c117efdab06bd232a3f0d6e81d7288a0551ed (patch) | |
tree | ad2aa347b862cc7446a1cc80f5932847e1491fbe /rootston/cursor.c | |
parent | a317ecdab8ef8deb184b72db208794daa4c4a3a0 (diff) | |
parent | f8b43940b1a14e78c5365c9c1d17bfc79f523530 (diff) |
Merge pull request #412 from emersion/cursor-scale
Scale cursors on scaled outputs
Diffstat (limited to 'rootston/cursor.c')
-rw-r--r-- | rootston/cursor.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index cba9e782..ecd5e9a0 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -6,6 +6,7 @@ #elif __FreeBSD__ #include <dev/evdev/input-event-codes.h> #endif +#include <wlr/types/wlr_xcursor_manager.h> #include <wlr/util/log.h> #include "rootston/xcursor.h" #include "rootston/cursor.h" @@ -27,12 +28,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); -} - 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 +45,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]); + wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, + ROOTS_XCURSOR_DEFAULT, cursor->cursor); cursor->cursor_client = NULL; } if (view) { |