[metacity] compositor: pass MetaSurface to show_window vfunc
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] compositor: pass MetaSurface to show_window vfunc
- Date: Sat, 5 Oct 2019 17:53:12 +0000 (UTC)
commit bbd30445dc53b6b6bdeb42aadcb166f977b73d0b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Oct 4 16:55:43 2019 +0300
compositor: pass MetaSurface to show_window vfunc
src/compositor/meta-compositor-none.c | 2 +-
src/compositor/meta-compositor-private.h | 2 +-
src/compositor/meta-compositor-vulkan.c | 2 +-
src/compositor/meta-compositor-xrender.c | 6 ++----
src/compositor/meta-compositor.c | 9 ++++++++-
5 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/src/compositor/meta-compositor-none.c b/src/compositor/meta-compositor-none.c
index 6659b4b1..954423c8 100644
--- a/src/compositor/meta-compositor-none.c
+++ b/src/compositor/meta-compositor-none.c
@@ -48,7 +48,7 @@ meta_compositor_none_remove_window (MetaCompositor *compositor,
static void
meta_compositor_none_show_window (MetaCompositor *compositor,
- MetaWindow *window,
+ MetaSurface *surface,
MetaEffectType effect)
{
}
diff --git a/src/compositor/meta-compositor-private.h b/src/compositor/meta-compositor-private.h
index b5625e4a..0a839442 100644
--- a/src/compositor/meta-compositor-private.h
+++ b/src/compositor/meta-compositor-private.h
@@ -39,7 +39,7 @@ struct _MetaCompositorClass
MetaWindow *window);
void (* show_window) (MetaCompositor *compositor,
- MetaWindow *window,
+ MetaSurface *surface,
MetaEffectType effect);
void (* hide_window) (MetaCompositor *compositor,
diff --git a/src/compositor/meta-compositor-vulkan.c b/src/compositor/meta-compositor-vulkan.c
index 2e2e794a..b5491985 100644
--- a/src/compositor/meta-compositor-vulkan.c
+++ b/src/compositor/meta-compositor-vulkan.c
@@ -1283,7 +1283,7 @@ meta_compositor_vulkan_remove_window (MetaCompositor *compositor,
static void
meta_compositor_vulkan_show_window (MetaCompositor *compositor,
- MetaWindow *window,
+ MetaSurface *surface,
MetaEffectType effect)
{
}
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 4c125657..f0a43582 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -2541,7 +2541,7 @@ meta_compositor_xrender_remove_window (MetaCompositor *compositor,
static void
meta_compositor_xrender_show_window (MetaCompositor *compositor,
- MetaWindow *window,
+ MetaSurface *surface,
MetaEffectType effect)
{
MetaCompositorXRender *xrender;
@@ -2549,9 +2549,7 @@ meta_compositor_xrender_show_window (MetaCompositor *compositor,
xrender = META_COMPOSITOR_XRENDER (compositor);
- cw = find_comp_window_by_window (xrender, window);
- if (cw == NULL)
- return;
+ cw = g_object_get_data (G_OBJECT (surface), "cw");
cw->damaged = TRUE;
diff --git a/src/compositor/meta-compositor.c b/src/compositor/meta-compositor.c
index 2606f316..1e0aa643 100644
--- a/src/compositor/meta-compositor.c
+++ b/src/compositor/meta-compositor.c
@@ -396,11 +396,18 @@ meta_compositor_show_window (MetaCompositor *compositor,
MetaWindow *window,
MetaEffectType effect)
{
+ MetaCompositorPrivate *priv;
MetaCompositorClass *compositor_class;
+ MetaSurface *surface;
+ priv = meta_compositor_get_instance_private (compositor);
compositor_class = META_COMPOSITOR_GET_CLASS (compositor);
- compositor_class->show_window (compositor, window, effect);
+ surface = g_hash_table_lookup (priv->surfaces, window);
+ if (surface == NULL)
+ return;
+
+ compositor_class->show_window (compositor, surface, effect);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]