cursor: Save the original MetaCursor a cursor came from
So we can recreate it as a server-side cursor
This commit is contained in:
parent
1762436775
commit
98a1573bee
@ -36,6 +36,7 @@ typedef struct {
|
||||
struct _MetaCursorReference {
|
||||
int ref_count;
|
||||
|
||||
MetaCursor cursor;
|
||||
MetaCursorImage image;
|
||||
};
|
||||
|
||||
|
@ -235,6 +235,7 @@ meta_cursor_reference_from_theme (MetaCursor cursor)
|
||||
|
||||
self = g_slice_new0 (MetaCursorReference);
|
||||
self->ref_count = 1;
|
||||
self->cursor = cursor;
|
||||
meta_cursor_image_load_from_xcursor_image (&self->image, image);
|
||||
|
||||
XcursorImageDestroy (image);
|
||||
@ -363,3 +364,9 @@ meta_cursor_reference_get_gbm_bo (MetaCursorReference *cursor,
|
||||
*hot_y = cursor->image.hot_y;
|
||||
return cursor->image.bo;
|
||||
}
|
||||
|
||||
MetaCursor
|
||||
meta_cursor_reference_get_meta_cursor (MetaCursorReference *cursor)
|
||||
{
|
||||
return cursor->cursor;
|
||||
}
|
||||
|
@ -36,6 +36,8 @@ MetaCursorReference * meta_cursor_reference_from_buffer (struct wl_resource *buf
|
||||
int hot_x,
|
||||
int hot_y);
|
||||
|
||||
MetaCursor meta_cursor_reference_get_meta_cursor (MetaCursorReference *cursor);
|
||||
|
||||
Cursor meta_cursor_create_x_cursor (Display *xdisplay,
|
||||
MetaCursor cursor);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user