Skip to content

Commit 9a9df2e

Browse files
jf2048bilelmoussaoui
authored andcommitted
gtk4: use impl_offset() for calculating template child offset
Since the #[repr(rust)] layout of PrivateStruct could change, this was failing to take the offset of `imp` into account.
1 parent 0f4968a commit 9a9df2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gtk4/src/subclass/widget.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ pub unsafe trait WidgetClassSubclassExt: ClassStruct {
12431243
let widget_class = self as *mut _ as *mut ffi::GtkWidgetClass;
12441244
let private_offset = <Self::Type as ObjectSubclassType>::type_data()
12451245
.as_ref()
1246-
.private_offset;
1246+
.impl_offset();
12471247
ffi::gtk_widget_class_bind_template_child_full(
12481248
widget_class,
12491249
name.to_glib_none().0,

0 commit comments

Comments
 (0)