screen-cast-window: Use buffer bounds in place of frame bounds

The frame bounds as returned by `meta_window_actor_get_frame_bounds()`
would be used as cropping values when streaming a window content.

But, as its name implies, it returns the actual frame bounds, whereas we
may want to include the whole buffer, to include client side shadows for
example.

Rename the `get_frame_bounds()` API to `get_buffer_bounds()` (which was
previously partly removed with commit 11bd84789) and return the actual
buffer bounds to use as the cropping area when streaming a window.

Fixes: 931934511 - "Implement MetaScreenCastWindow interface"
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1022
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/1018
This commit is contained in:
Olivier Fourdan
2020-01-28 11:13:41 +01:00
parent ebc07871eb
commit 0f58c98386
4 changed files with 18 additions and 26 deletions

View File

@ -230,8 +230,8 @@ meta_screen_cast_window_stream_src_get_videocrop (MetaScreenCastStreamSrc *src,
META_SCREEN_CAST_WINDOW_STREAM_SRC (src);
MetaRectangle stream_rect;
meta_screen_cast_window_get_frame_bounds (window_src->screen_cast_window,
crop_rect);
meta_screen_cast_window_get_buffer_bounds (window_src->screen_cast_window,
crop_rect);
stream_rect.x = 0;
stream_rect.y = 0;