mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 23:46:33 -05:00
streams: Don't bail out when cursor is outside the stream
PipeWire reuses buffers, and buffer metadatas, when streaming. When the cursor is moved to outside the stream, the cursor meta also needs to be updated, otherwise it'll use the cursor position of whatever is in the buffer. Don't bail out when cursor is outside the stream, and ensure to record a metadata-only frame. This only applies to metadata streams. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1417
This commit is contained in:
parent
7700dc904b
commit
2b67030dbb
@ -172,9 +172,6 @@ sync_cursor_state (MetaScreenCastAreaStreamSrc *area_src)
|
||||
MetaScreenCastStreamSrc *src = META_SCREEN_CAST_STREAM_SRC (area_src);
|
||||
MetaScreenCastRecordFlag flags;
|
||||
|
||||
if (!is_cursor_in_stream (area_src))
|
||||
return;
|
||||
|
||||
if (is_redraw_queued (area_src))
|
||||
return;
|
||||
|
||||
|
@ -206,9 +206,6 @@ sync_cursor_state (MetaScreenCastMonitorStreamSrc *monitor_src)
|
||||
MetaScreenCastStreamSrc *src = META_SCREEN_CAST_STREAM_SRC (monitor_src);
|
||||
MetaScreenCastRecordFlag flags;
|
||||
|
||||
if (!is_cursor_in_stream (monitor_src))
|
||||
return;
|
||||
|
||||
if (is_redraw_queued (monitor_src))
|
||||
return;
|
||||
|
||||
|
@ -354,37 +354,12 @@ screen_cast_window_destroyed (MetaWindowActor *actor,
|
||||
window_src->screen_cast_window = NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_cursor_in_stream (MetaScreenCastWindowStreamSrc *window_src)
|
||||
{
|
||||
MetaBackend *backend = get_backend (window_src);
|
||||
MetaCursorRenderer *cursor_renderer =
|
||||
meta_backend_get_cursor_renderer (backend);
|
||||
MetaCursorSprite *cursor_sprite;
|
||||
graphene_point_t cursor_position;
|
||||
MetaScreenCastWindow *screen_cast_window;
|
||||
|
||||
cursor_sprite = meta_cursor_renderer_get_cursor (cursor_renderer);
|
||||
|
||||
cursor_position = meta_cursor_renderer_get_position (cursor_renderer);
|
||||
|
||||
screen_cast_window = window_src->screen_cast_window;
|
||||
return meta_screen_cast_window_transform_cursor_position (screen_cast_window,
|
||||
cursor_sprite,
|
||||
&cursor_position,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
sync_cursor_state (MetaScreenCastWindowStreamSrc *window_src)
|
||||
{
|
||||
MetaScreenCastStreamSrc *src = META_SCREEN_CAST_STREAM_SRC (window_src);
|
||||
MetaScreenCastRecordFlag flags;
|
||||
|
||||
if (!is_cursor_in_stream (window_src))
|
||||
return;
|
||||
|
||||
if (meta_screen_cast_window_has_damage (window_src->screen_cast_window))
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user