diff --git a/src/backends/meta-cursor-tracker.c b/src/backends/meta-cursor-tracker.c index 24776e266..0df4d73cd 100644 --- a/src/backends/meta-cursor-tracker.c +++ b/src/backends/meta-cursor-tracker.c @@ -362,6 +362,25 @@ meta_cursor_tracker_get_sprite (MetaCursorTracker *tracker) return meta_cursor_sprite_get_cogl_texture (cursor_sprite); } +/** + * meta_cursor_tracker_get_scale: + * @tracker: + * + * Returns: + */ +float +meta_cursor_tracker_get_scale (MetaCursorTracker *tracker) +{ + MetaCursorSprite *cursor_sprite; + + cursor_sprite = META_CURSOR_TRACKER_GET_CLASS (tracker)->get_sprite (tracker); + + if (!cursor_sprite) + return 1.0; + + return meta_cursor_sprite_get_texture_scale (cursor_sprite); +} + /** * meta_cursor_tracker_get_hot: * @tracker: diff --git a/src/meta/meta-cursor-tracker.h b/src/meta/meta-cursor-tracker.h index a3b71c4f6..fb4750c66 100644 --- a/src/meta/meta-cursor-tracker.h +++ b/src/meta/meta-cursor-tracker.h @@ -48,6 +48,9 @@ void meta_cursor_tracker_get_hot (MetaCursorTracker *tracker, META_EXPORT CoglTexture *meta_cursor_tracker_get_sprite (MetaCursorTracker *tracker); +META_EXPORT +float meta_cursor_tracker_get_scale (MetaCursorTracker *tracker); + META_EXPORT void meta_cursor_tracker_get_pointer (MetaCursorTracker *tracker, graphene_point_t *coords,