diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-22 19:22:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-22 21:58:25 +0200 |
commit | a197ad20a8b4511f710b0f6f9d1d7f0ccf4de0aa (patch) | |
tree | 3c43cc2901d1cac298051d71faae6494e919365d /vcl | |
parent | 4f521ac7a362f0dc32898c2372efd8aa84f548de (diff) |
gtk[3|4] get class size from g_type_query of viewport type
Change-Id: I7121159b600b9be6e3b80364ada1f145226c26da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115999
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 611ca2a1096b..631da4d4af14 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -6212,9 +6212,12 @@ GType immobilized_viewport_get_type() if (!type) { + GTypeQuery query; + g_type_query(gtk_viewport_get_type(), &query); + static const GTypeInfo tinfo = { - sizeof (GtkViewportClass), + static_cast<guint16>(query.class_size), nullptr, /* base init */ nullptr, /* base finalize */ reinterpret_cast<GClassInitFunc>(immobilized_viewport_class_init), /* class init */ |