diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2019-10-13 15:52:23 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2019-10-13 20:36:19 +0300 |
commit | 0af8472b863d622bbc99eea7dd73f4de74e816ca (patch) | |
tree | 808af7bc3581a98a50aa7bb4f60396702ce47005 | |
parent | 9355d362096ba2bd9e0f1e3d8ad9d8b0861b0ddb (diff) | |
download | metacity-0af8472b863d622bbc99eea7dd73f4de74e816ca.tar.gz |
compositor: pass MetaSurface to window_opaque_region_changed
-rw-r--r-- | src/compositor/meta-compositor-none.c | 2 | ||||
-rw-r--r-- | src/compositor/meta-compositor-private.h | 2 | ||||
-rw-r--r-- | src/compositor/meta-compositor-vulkan.c | 2 | ||||
-rw-r--r-- | src/compositor/meta-compositor-xrender.c | 2 | ||||
-rw-r--r-- | src/compositor/meta-compositor.c | 9 |
5 files changed, 12 insertions, 5 deletions
diff --git a/src/compositor/meta-compositor-none.c b/src/compositor/meta-compositor-none.c index b564832f..b4f45074 100644 --- a/src/compositor/meta-compositor-none.c +++ b/src/compositor/meta-compositor-none.c @@ -68,7 +68,7 @@ meta_compositor_none_window_opacity_changed (MetaCompositor *compositor, static void meta_compositor_none_window_opaque_region_changed (MetaCompositor *compositor, - MetaWindow *window) + MetaSurface *surface) { } diff --git a/src/compositor/meta-compositor-private.h b/src/compositor/meta-compositor-private.h index c4f41d92..840a7639 100644 --- a/src/compositor/meta-compositor-private.h +++ b/src/compositor/meta-compositor-private.h @@ -50,7 +50,7 @@ struct _MetaCompositorClass MetaSurface *surface); void (* window_opaque_region_changed) (MetaCompositor *compositor, - MetaWindow *window); + MetaSurface *surface); void (* window_shape_region_changed) (MetaCompositor *compositor, MetaWindow *window); diff --git a/src/compositor/meta-compositor-vulkan.c b/src/compositor/meta-compositor-vulkan.c index 0e551f75..cdbbd432 100644 --- a/src/compositor/meta-compositor-vulkan.c +++ b/src/compositor/meta-compositor-vulkan.c @@ -1303,7 +1303,7 @@ meta_compositor_vulkan_window_opacity_changed (MetaCompositor *compositor, static void meta_compositor_vulkan_window_opaque_region_changed (MetaCompositor *compositor, - MetaWindow *window) + MetaSurface *surface) { } diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c index 43ad3c5e..9f8b40a9 100644 --- a/src/compositor/meta-compositor-xrender.c +++ b/src/compositor/meta-compositor-xrender.c @@ -2166,7 +2166,7 @@ meta_compositor_xrender_window_opacity_changed (MetaCompositor *compositor, static void meta_compositor_xrender_window_opaque_region_changed (MetaCompositor *compositor, - MetaWindow *window) + MetaSurface *surface) { } diff --git a/src/compositor/meta-compositor.c b/src/compositor/meta-compositor.c index 72bf364a..187e5936 100644 --- a/src/compositor/meta-compositor.c +++ b/src/compositor/meta-compositor.c @@ -492,11 +492,18 @@ void meta_compositor_window_opaque_region_changed (MetaCompositor *compositor, MetaWindow *window) { + MetaCompositorPrivate *priv; MetaCompositorClass *compositor_class; + MetaSurface *surface; + priv = meta_compositor_get_instance_private (compositor); compositor_class = META_COMPOSITOR_GET_CLASS (compositor); - compositor_class->window_opaque_region_changed (compositor, window); + surface = g_hash_table_lookup (priv->surfaces, window); + if (surface == NULL) + return; + + compositor_class->window_opaque_region_changed (compositor, surface); } void |