[mutter/gnome-3-36] streams: Don't bail out when cursor is outside the stream
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-36] streams: Don't bail out when cursor is outside the stream
- Date: Sat, 29 Aug 2020 09:49:35 +0000 (UTC)
commit 02a46f3708d3f518893aed8a9b49d86dc92e88ab
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Aug 27 11:17:42 2020 -0300
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
(cherry picked from commit 2b67030dbb918c46b5e8c6fae720cad8e2befb9e)
src/backends/meta-screen-cast-monitor-stream-src.c | 3 ---
src/backends/meta-screen-cast-window-stream-src.c | 25 ----------------------
2 files changed, 28 deletions(-)
---
diff --git a/src/backends/meta-screen-cast-monitor-stream-src.c
b/src/backends/meta-screen-cast-monitor-stream-src.c
index c902e98e5e..7c35b3c76a 100644
--- a/src/backends/meta-screen-cast-monitor-stream-src.c
+++ b/src/backends/meta-screen-cast-monitor-stream-src.c
@@ -185,9 +185,6 @@ sync_cursor_state (MetaScreenCastMonitorStreamSrc *monitor_src)
ClutterStage *stage = get_stage (monitor_src);
MetaScreenCastRecordFlag flags;
- if (!is_cursor_in_stream (monitor_src))
- return;
-
if (clutter_stage_is_redraw_queued (stage))
return;
diff --git a/src/backends/meta-screen-cast-window-stream-src.c
b/src/backends/meta-screen-cast-window-stream-src.c
index e80cd5e360..1d5301bcbf 100644
--- a/src/backends/meta-screen-cast-window-stream-src.c
+++ b/src/backends/meta-screen-cast-window-stream-src.c
@@ -341,37 +341,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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]