mirror of
https://github.com/brl/mutter.git
synced 2025-07-28 12:38:04 +00:00
output: Make implementations inherit MetaOutput
Instead of the home baked "inheritance" system, using a gpointer and a GDestroyNotify function to keep the what effectively is sub type details, make MetaOutput an abstract derivable type, and make the implementations inherit it. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1287
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
4920b5064d
commit
4a4f2d8264
@@ -53,7 +53,7 @@ typedef struct _MetaOutputPrivate
|
||||
int backlight;
|
||||
} MetaOutputPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (MetaOutput, meta_output, G_TYPE_OBJECT)
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (MetaOutput, meta_output, G_TYPE_OBJECT)
|
||||
|
||||
G_DEFINE_BOXED_TYPE (MetaOutputInfo, meta_output_info,
|
||||
meta_output_info_ref,
|
||||
@@ -308,9 +308,6 @@ meta_output_finalize (GObject *object)
|
||||
MetaOutput *output = META_OUTPUT (object);
|
||||
MetaOutputPrivate *priv = meta_output_get_instance_private (output);
|
||||
|
||||
if (output->driver_notify)
|
||||
output->driver_notify (output);
|
||||
|
||||
g_clear_pointer (&priv->info, meta_output_info_unref);
|
||||
|
||||
G_OBJECT_CLASS (meta_output_parent_class)->finalize (object);
|
||||
|
Reference in New Issue
Block a user