From 11bd847896445028beb077bc601897386699a400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 21 Jan 2019 19:20:04 +0100 Subject: [PATCH] screen-cast-window-stream: Don't set the position property It was not meant to be set for window streams, and was set to (0, 0) anyway. This removes the corresponding MetaScreenCastWindow API, as it's not needed anymore. https://gitlab.gnome.org/GNOME/mutter/merge_requests/413 --- src/backends/meta-screen-cast-window-stream.c | 10 ---------- src/backends/meta-screen-cast-window.c | 8 -------- src/backends/meta-screen-cast-window.h | 6 ------ src/compositor/meta-window-actor.c | 15 --------------- 4 files changed, 39 deletions(-) diff --git a/src/backends/meta-screen-cast-window-stream.c b/src/backends/meta-screen-cast-window-stream.c index 0cb39bb14..19645540c 100644 --- a/src/backends/meta-screen-cast-window-stream.c +++ b/src/backends/meta-screen-cast-window-stream.c @@ -116,16 +116,6 @@ meta_screen_cast_window_stream_set_parameters (MetaScreenCastStream *stream, { MetaScreenCastWindowStream *window_stream = META_SCREEN_CAST_WINDOW_STREAM (stream); - MetaScreenCastWindow *screen_cast_window = - META_SCREEN_CAST_WINDOW (meta_window_actor_from_window (window_stream->window)); - MetaRectangle bounds; - - meta_screen_cast_window_get_buffer_bounds (screen_cast_window, &bounds); - - g_variant_builder_add (parameters_builder, "{sv}", - "position", - g_variant_new ("(ii)", - bounds.x, bounds.y)); g_variant_builder_add (parameters_builder, "{sv}", "size", diff --git a/src/backends/meta-screen-cast-window.c b/src/backends/meta-screen-cast-window.c index 21629a0cd..9878b223f 100644 --- a/src/backends/meta-screen-cast-window.c +++ b/src/backends/meta-screen-cast-window.c @@ -29,14 +29,6 @@ meta_screen_cast_window_default_init (MetaScreenCastWindowInterface *iface) { } -void -meta_screen_cast_window_get_buffer_bounds (MetaScreenCastWindow *screen_cast_window, - MetaRectangle *bounds) -{ - META_SCREEN_CAST_WINDOW_GET_IFACE (screen_cast_window)->get_buffer_bounds (screen_cast_window, - bounds); -} - void meta_screen_cast_window_get_frame_bounds (MetaScreenCastWindow *screen_cast_window, MetaRectangle *bounds) diff --git a/src/backends/meta-screen-cast-window.h b/src/backends/meta-screen-cast-window.h index e023d3e17..ba70f9b85 100644 --- a/src/backends/meta-screen-cast-window.h +++ b/src/backends/meta-screen-cast-window.h @@ -36,9 +36,6 @@ struct _MetaScreenCastWindowInterface { GTypeInterface parent_iface; - void (*get_buffer_bounds) (MetaScreenCastWindow *screen_cast_window, - MetaRectangle *bounds); - void (*get_frame_bounds) (MetaScreenCastWindow *screen_cast_window, MetaRectangle *bounds); @@ -53,9 +50,6 @@ struct _MetaScreenCastWindowInterface uint8_t *data); }; -void meta_screen_cast_window_get_buffer_bounds (MetaScreenCastWindow *screen_cast_window, - MetaRectangle *bounds); - void meta_screen_cast_window_get_frame_bounds (MetaScreenCastWindow *screen_cast_window, MetaRectangle *bounds); diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 20a22062f..0af96beca 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -1850,20 +1850,6 @@ meta_window_actor_from_window (MetaWindow *window) return META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); } -static void -meta_window_actor_get_buffer_bounds (MetaScreenCastWindow *screen_cast_window, - MetaRectangle *bounds) -{ - MetaWindowActor *window_actor = META_WINDOW_ACTOR (screen_cast_window); - ClutterActor *clutter_actor; - - clutter_actor = CLUTTER_ACTOR (meta_window_actor_get_texture (window_actor)); - bounds->x = 0; - bounds->y = 0; - bounds->width = (int) clutter_actor_get_width (clutter_actor); - bounds->height = (int) clutter_actor_get_height (clutter_actor); -} - static void meta_window_actor_get_frame_bounds (MetaScreenCastWindow *screen_cast_window, MetaRectangle *bounds) @@ -1978,7 +1964,6 @@ meta_window_actor_capture_into (MetaScreenCastWindow *screen_cast_window, static void screen_cast_window_iface_init (MetaScreenCastWindowInterface *iface) { - iface->get_buffer_bounds = meta_window_actor_get_buffer_bounds; iface->get_frame_bounds = meta_window_actor_get_frame_bounds; iface->transform_relative_position = meta_window_actor_transform_relative_position; iface->capture_into = meta_window_actor_capture_into;