summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-22 19:22:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-22 21:58:25 +0200
commita197ad20a8b4511f710b0f6f9d1d7f0ccf4de0aa (patch)
tree3c43cc2901d1cac298051d71faae6494e919365d /vcl
parent4f521ac7a362f0dc32898c2372efd8aa84f548de (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.cxx5
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 */