diff --git a/src/backends/meta-cursor.c b/src/backends/meta-cursor.c index 8e6dbb464..1558ed5d8 100644 --- a/src/backends/meta-cursor.c +++ b/src/backends/meta-cursor.c @@ -119,18 +119,11 @@ translate_meta_cursor (MetaCursor cursor) g_assert_not_reached (); } -static Cursor -load_cursor_on_server (MetaDisplay *display, - MetaCursor cursor) -{ - return XcursorLibraryLoadCursor (display->xdisplay, translate_meta_cursor (cursor)); -} - Cursor -meta_display_create_x_cursor (MetaDisplay *display, - MetaCursor cursor) +meta_cursor_create_x_cursor (Display *xdisplay, + MetaCursor cursor) { - return load_cursor_on_server (display, cursor); + return XcursorLibraryLoadCursor (xdisplay, translate_meta_cursor (cursor)); } static XcursorImage * diff --git a/src/backends/meta-cursor.h b/src/backends/meta-cursor.h index c478d1d28..483115eb4 100644 --- a/src/backends/meta-cursor.h +++ b/src/backends/meta-cursor.h @@ -36,4 +36,7 @@ MetaCursorReference * meta_cursor_reference_from_buffer (struct wl_resource *buf int hot_x, int hot_y); +Cursor meta_cursor_create_x_cursor (Display *xdisplay, + MetaCursor cursor); + #endif /* META_CURSOR_H */ diff --git a/src/core/display.c b/src/core/display.c index e3d71fb6c..543815a99 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -3281,3 +3281,10 @@ meta_display_clear_mouse_mode (MetaDisplay *display) { display->mouse_mode = FALSE; } + +Cursor +meta_display_create_x_cursor (MetaDisplay *display, + MetaCursor cursor) +{ + return meta_cursor_create_x_cursor (display->xdisplay, cursor); +}