diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c index d83512645..145f98873 100644 --- a/src/backends/native/meta-cursor-renderer-native.c +++ b/src/backends/native/meta-cursor-renderer-native.c @@ -384,7 +384,9 @@ meta_cursor_renderer_native_update_cursor (MetaCursorRenderer *cursor_renderer, meta_kms_cursor_manager_update_sprite (kms_cursor_manager, kms_crtc, - NULL, NULL); + NULL, + META_MONITOR_TRANSFORM_NORMAL, + NULL); } } } @@ -657,6 +659,7 @@ load_cursor_sprite_gbm_buffer_for_crtc (MetaCursorRendererNative *native, meta_kms_cursor_manager_update_sprite (kms_cursor_manager, kms_crtc, buffer, + transform, &hotspot); return TRUE; } @@ -982,6 +985,7 @@ realize_cursor_sprite_from_wl_buffer_for_crtc (MetaCursorRenderer *renderer meta_kms_cursor_manager_update_sprite (kms_cursor_manager, kms_crtc, META_DRM_BUFFER (buffer_gbm), + META_MONITOR_TRANSFORM_NORMAL, &GRAPHENE_POINT_INIT (hot_x, hot_y)); return TRUE; diff --git a/src/backends/native/meta-kms-cursor-manager.c b/src/backends/native/meta-kms-cursor-manager.c index 215f250cb..3bcf9dc34 100644 --- a/src/backends/native/meta-kms-cursor-manager.c +++ b/src/backends/native/meta-kms-cursor-manager.c @@ -49,6 +49,7 @@ typedef struct _CrtcStateImpl MetaKmsCrtc *crtc; graphene_rect_t layout; float scale; + MetaMonitorTransform transform; MetaDrmBuffer *buffer; graphene_point_t hotspot; @@ -719,6 +720,7 @@ typedef struct { MetaKmsCrtc *crtc; MetaDrmBuffer *buffer; + MetaMonitorTransform transform; graphene_point_t hotspot; } UpdateSpriteData; @@ -742,6 +744,7 @@ update_sprite_in_impl (MetaThreadImpl *thread_impl, old_buffer = g_steal_pointer (&crtc_state_impl->buffer); crtc_state_impl->buffer = g_steal_pointer (&data->buffer); + crtc_state_impl->transform = data->transform; crtc_state_impl->hotspot = data->hotspot; crtc_state_impl->cursor_invalidated = TRUE; @@ -764,6 +767,7 @@ void meta_kms_cursor_manager_update_sprite (MetaKmsCursorManager *cursor_manager, MetaKmsCrtc *crtc, MetaDrmBuffer *buffer, + MetaMonitorTransform transform, const graphene_point_t *hotspot) { UpdateSpriteData *data; @@ -771,6 +775,7 @@ meta_kms_cursor_manager_update_sprite (MetaKmsCursorManager *cursor_manager, data = g_new0 (UpdateSpriteData, 1); data->crtc = crtc; data->buffer = buffer ? g_object_ref (buffer) : NULL; + data->transform = transform; if (hotspot) data->hotspot = *hotspot; diff --git a/src/backends/native/meta-kms-cursor-manager.h b/src/backends/native/meta-kms-cursor-manager.h index 61aac7903..2d2a8f6ad 100644 --- a/src/backends/native/meta-kms-cursor-manager.h +++ b/src/backends/native/meta-kms-cursor-manager.h @@ -22,6 +22,7 @@ #include #include +#include "backends/meta-monitor-transform.h" #include "backends/native/meta-backend-native-types.h" #include "backends/native/meta-kms-types.h" #include "core/util-private.h" @@ -54,6 +55,7 @@ void meta_kms_cursor_manager_position_changed_in_input_impl (MetaKmsCursorManage void meta_kms_cursor_manager_update_sprite (MetaKmsCursorManager *cursor_manager, MetaKmsCrtc *crtc, MetaDrmBuffer *buffer, + MetaMonitorTransform transform, const graphene_point_t *hotspot); META_EXPORT_TEST