diff --git a/src/subclass/application_window.rs b/src/subclass/application_window.rs index a90fa6929050..57abf6318b6a 100644 --- a/src/subclass/application_window.rs +++ b/src/subclass/application_window.rs @@ -2,11 +2,14 @@ use glib::subclass::prelude::*; use super::window::WindowImpl; use ApplicationWindowClass; +use WindowClass; pub trait ApplicationWindowImpl: WindowImpl + 'static {} unsafe impl IsSubclassable for ApplicationWindowClass { - fn override_vfuncs(&mut self) {} + fn override_vfuncs(&mut self) { + >::override_vfuncs(self); + } } diff --git a/src/subclass/bin.rs b/src/subclass/bin.rs index c73cb524aacd..f4c896de89bd 100644 --- a/src/subclass/bin.rs +++ b/src/subclass/bin.rs @@ -2,9 +2,12 @@ use glib::subclass::prelude::*; use super::container::ContainerImpl; use BinClass; +use ContainerClass; pub trait BinImpl: ContainerImpl + 'static {} unsafe impl IsSubclassable for BinClass { - fn override_vfuncs(&mut self) {} + fn override_vfuncs(&mut self) { + >::override_vfuncs(self); + } } diff --git a/src/subclass/box_.rs b/src/subclass/box_.rs index 44a43f48f930..208f9d2511cf 100644 --- a/src/subclass/box_.rs +++ b/src/subclass/box_.rs @@ -2,9 +2,12 @@ use glib::subclass::prelude::*; use super::container::ContainerImpl; use BoxClass; +use ContainerClass; pub trait BoxImpl: ContainerImpl + 'static {} unsafe impl IsSubclassable for BoxClass { - fn override_vfuncs(&mut self) {} + fn override_vfuncs(&mut self) { + >::override_vfuncs(self); + } } diff --git a/src/subclass/container.rs b/src/subclass/container.rs index 6cb854566f15..6599e7cccbe4 100644 --- a/src/subclass/container.rs +++ b/src/subclass/container.rs @@ -8,6 +8,7 @@ use super::widget::WidgetImpl; use Container; use ContainerClass; use Widget; +use WidgetClass; use WidgetPath; pub trait ContainerImpl: ContainerImplExt + WidgetImpl + 'static { @@ -99,6 +100,7 @@ impl ContainerImplExt for T { unsafe impl IsSubclassable for ContainerClass { fn override_vfuncs(&mut self) { + >::override_vfuncs(self); unsafe { let klass = &mut *(self as *mut Self as *mut gtk_sys::GtkContainerClass); klass.add = Some(container_add::); diff --git a/src/subclass/dialog.rs b/src/subclass/dialog.rs index cf0e3ab19532..bf7df9eba39b 100644 --- a/src/subclass/dialog.rs +++ b/src/subclass/dialog.rs @@ -8,6 +8,7 @@ use super::window::WindowImpl; use Dialog; use DialogClass; use ResponseType; +use WindowClass; pub trait DialogImpl: DialogImplExt + WindowImpl + 'static { fn response(&self, dialog: &Dialog, response: ResponseType) { @@ -50,6 +51,7 @@ impl DialogImplExt for T { unsafe impl IsSubclassable for DialogClass { fn override_vfuncs(&mut self) { + >::override_vfuncs(self); unsafe { let klass = &mut *(self as *mut Self as *mut gtk_sys::GtkDialogClass); klass.response = Some(dialog_response::); diff --git a/src/subclass/header_bar.rs b/src/subclass/header_bar.rs index 5d2036e4ef20..f4dceb7b7142 100644 --- a/src/subclass/header_bar.rs +++ b/src/subclass/header_bar.rs @@ -1,10 +1,13 @@ use glib::subclass::prelude::*; use super::container::ContainerImpl; +use ContainerClass; use HeaderBarClass; pub trait HeaderBarImpl: ContainerImpl + 'static {} unsafe impl IsSubclassable for HeaderBarClass { - fn override_vfuncs(&mut self) {} + fn override_vfuncs(&mut self) { + >::override_vfuncs(self); + } } diff --git a/src/subclass/widget.rs b/src/subclass/widget.rs index d5b8bdc22217..8699647e8d1e 100644 --- a/src/subclass/widget.rs +++ b/src/subclass/widget.rs @@ -3,6 +3,7 @@ use gtk_sys; use glib::translate::*; use glib::subclass::prelude::*; +use glib::ObjectClass; use crate::DragResult; use crate::SelectionData; @@ -292,6 +293,7 @@ impl WidgetImplExt for T { unsafe impl IsSubclassable for WidgetClass { fn override_vfuncs(&mut self) { + >::override_vfuncs(self); unsafe { let klass = &mut *(self as *mut Self as *mut gtk_sys::GtkWidgetClass); // klass.can_activate_accel = Some(widget_can_activate_accel::); diff --git a/src/subclass/window.rs b/src/subclass/window.rs index ad8785343fc2..83db27f0da64 100644 --- a/src/subclass/window.rs +++ b/src/subclass/window.rs @@ -5,6 +5,7 @@ use glib::translate::*; use glib::subclass::prelude::*; use super::bin::BinImpl; +use BinClass; use Window; use WindowClass; @@ -97,6 +98,7 @@ impl WindowImplExt for T { unsafe impl IsSubclassable for WindowClass { fn override_vfuncs(&mut self) { + >::override_vfuncs(self); unsafe { let klass = &mut *(self as *mut Self as *mut gtk_sys::GtkWindowClass); klass.activate_focus = Some(window_activate_focus::);