diff --git a/src/backends/meta-screen-cast-area-stream-src.c b/src/backends/meta-screen-cast-area-stream-src.c index 584617753..e22b7dcab 100644 --- a/src/backends/meta-screen-cast-area-stream-src.c +++ b/src/backends/meta-screen-cast-area-stream-src.c @@ -505,6 +505,8 @@ meta_screen_cast_area_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc *s MetaBackend *backend = get_backend (area_src); MetaCursorRenderer *cursor_renderer = meta_backend_get_cursor_renderer (backend); + MetaCursorTracker *cursor_tracker = + meta_backend_get_cursor_tracker (backend); MetaCursorSprite *cursor_sprite; MetaRectangle *area; float scale; @@ -513,7 +515,8 @@ meta_screen_cast_area_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc *s cursor_sprite = meta_cursor_renderer_get_cursor (cursor_renderer); - if (!is_cursor_in_stream (area_src)) + if (!meta_cursor_tracker_get_pointer_visible (cursor_tracker) || + !is_cursor_in_stream (area_src)) { meta_screen_cast_stream_src_unset_cursor_metadata (src, spa_meta_cursor); diff --git a/src/backends/meta-screen-cast-monitor-stream-src.c b/src/backends/meta-screen-cast-monitor-stream-src.c index b0b3b3763..2a22dc535 100644 --- a/src/backends/meta-screen-cast-monitor-stream-src.c +++ b/src/backends/meta-screen-cast-monitor-stream-src.c @@ -632,6 +632,8 @@ meta_screen_cast_monitor_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc MetaBackend *backend = get_backend (monitor_src); MetaCursorRenderer *cursor_renderer = meta_backend_get_cursor_renderer (backend); + MetaCursorTracker *cursor_tracker = + meta_backend_get_cursor_tracker (backend); MetaCursorSprite *cursor_sprite; MetaMonitor *monitor; MetaLogicalMonitor *logical_monitor; @@ -643,7 +645,8 @@ meta_screen_cast_monitor_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc cursor_sprite = meta_cursor_renderer_get_cursor (cursor_renderer); - if (!is_cursor_in_stream (monitor_src)) + if (!meta_cursor_tracker_get_pointer_visible (cursor_tracker) || + !is_cursor_in_stream (monitor_src)) { meta_screen_cast_stream_src_unset_cursor_metadata (src, spa_meta_cursor); diff --git a/src/backends/meta-screen-cast-window-stream-src.c b/src/backends/meta-screen-cast-window-stream-src.c index 3f7cb356d..a00bf867a 100644 --- a/src/backends/meta-screen-cast-window-stream-src.c +++ b/src/backends/meta-screen-cast-window-stream-src.c @@ -516,6 +516,8 @@ meta_screen_cast_window_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc MetaBackend *backend = get_backend (window_src); MetaCursorRenderer *cursor_renderer = meta_backend_get_cursor_renderer (backend); + MetaCursorTracker *cursor_tracker = + meta_backend_get_cursor_tracker (backend); MetaScreenCastWindow *screen_cast_window = window_src->screen_cast_window; MetaCursorSprite *cursor_sprite; graphene_point_t cursor_position; @@ -526,7 +528,8 @@ meta_screen_cast_window_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc cursor_sprite = meta_cursor_renderer_get_cursor (cursor_renderer); cursor_position = meta_cursor_renderer_get_position (cursor_renderer); - if (!meta_screen_cast_window_transform_cursor_position (screen_cast_window, + if (!meta_cursor_tracker_get_pointer_visible (cursor_tracker) || + !meta_screen_cast_window_transform_cursor_position (screen_cast_window, cursor_sprite, &cursor_position, &scale,