summaryrefslogtreecommitdiffstats
path: root/views/controls/native_control_gtk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/native_control_gtk.cc')
-rw-r--r--views/controls/native_control_gtk.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/views/controls/native_control_gtk.cc b/views/controls/native_control_gtk.cc
index b1ec8b7..5576f29 100644
--- a/views/controls/native_control_gtk.cc
+++ b/views/controls/native_control_gtk.cc
@@ -45,7 +45,9 @@ void NativeControlGtk::VisibilityChanged(View* starting_from, bool is_visible) {
if (!is_visible) {
// We destroy the child widget when we become invisible because of the
// performance cost of maintaining widgets that aren't currently needed.
+ GtkWidget* widget = native_view();
Detach();
+ gtk_widget_destroy(widget);
} else if (!native_view()) {
CreateNativeControl();
}