[metacity] surface: add show vfunc
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] surface: add show vfunc
- Date: Fri, 11 Oct 2019 22:04:06 +0000 (UTC)
commit eb733e1a6b471d2c289509dcc6bc6472bc5800d7
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Oct 11 22:49:40 2019 +0300
surface: add show vfunc
src/compositor/meta-surface-private.h | 2 ++
src/compositor/meta-surface-vulkan.c | 6 ++++++
src/compositor/meta-surface-xrender.c | 6 ++++++
src/compositor/meta-surface.c | 2 ++
4 files changed, 16 insertions(+)
---
diff --git a/src/compositor/meta-surface-private.h b/src/compositor/meta-surface-private.h
index d1ae613d..799066c2 100644
--- a/src/compositor/meta-surface-private.h
+++ b/src/compositor/meta-surface-private.h
@@ -26,6 +26,8 @@ struct _MetaSurfaceClass
{
GObjectClass parent_class;
+ void (* show) (MetaSurface *self);
+
void (* hide) (MetaSurface *self);
void (* opacity_changed) (MetaSurface *self);
diff --git a/src/compositor/meta-surface-vulkan.c b/src/compositor/meta-surface-vulkan.c
index a17271fe..f106c004 100644
--- a/src/compositor/meta-surface-vulkan.c
+++ b/src/compositor/meta-surface-vulkan.c
@@ -25,6 +25,11 @@ struct _MetaSurfaceVulkan
G_DEFINE_TYPE (MetaSurfaceVulkan, meta_surface_vulkan, META_TYPE_SURFACE)
+static void
+meta_surface_vulkan_show (MetaSurface *surface)
+{
+}
+
static void
meta_surface_vulkan_hide (MetaSurface *surface)
{
@@ -52,6 +57,7 @@ meta_surface_vulkan_class_init (MetaSurfaceVulkanClass *self_class)
surface_class = META_SURFACE_CLASS (self_class);
+ surface_class->show = meta_surface_vulkan_show;
surface_class->hide = meta_surface_vulkan_hide;
surface_class->opacity_changed = meta_surface_vulkan_opacity_changed;
surface_class->free_pixmap = meta_surface_vulkan_free_pixmap;
diff --git a/src/compositor/meta-surface-xrender.c b/src/compositor/meta-surface-xrender.c
index 14819829..b7bc7b84 100644
--- a/src/compositor/meta-surface-xrender.c
+++ b/src/compositor/meta-surface-xrender.c
@@ -115,6 +115,11 @@ meta_surface_xrender_finalize (GObject *object)
G_OBJECT_CLASS (meta_surface_xrender_parent_class)->finalize (object);
}
+static void
+meta_surface_xrender_show (MetaSurface *surface)
+{
+}
+
static void
meta_surface_xrender_hide (MetaSurface *surface)
{
@@ -168,6 +173,7 @@ meta_surface_xrender_class_init (MetaSurfaceXRenderClass *self_class)
object_class->finalize = meta_surface_xrender_finalize;
+ surface_class->show = meta_surface_xrender_show;
surface_class->hide = meta_surface_xrender_hide;
surface_class->opacity_changed = meta_surface_xrender_opacity_changed;
surface_class->free_pixmap = meta_surface_xrender_free_pixmap;
diff --git a/src/compositor/meta-surface.c b/src/compositor/meta-surface.c
index 096ee12f..04bb5350 100644
--- a/src/compositor/meta-surface.c
+++ b/src/compositor/meta-surface.c
@@ -341,6 +341,8 @@ meta_surface_show (MetaSurface *self)
* a valid pixmap when the window is unmapped.
*/
free_pixmap (self);
+
+ META_SURFACE_GET_CLASS (self)->show (self);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]