Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6135)

Unified Diff: chrome/browser/ui/gtk/bubble/bubble_gtk.cc

Issue 10985026: [gtk] Close zoom bubble immediately when window is closed to avoid orphaned (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/bubble/bubble_gtk.h ('k') | chrome/browser/ui/gtk/zoom_bubble_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/bubble/bubble_gtk.cc
diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
index 4ffee09feb9ff5c5eb682603ba85cbf39077d797..a030450584615b44d00fb0dce9e23dea17ec1e08 100644
--- a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
@@ -186,16 +186,15 @@ void BubbleGtk::Init(GtkWidget* anchor_widget,
signals_.Connect(anchor_widget_, "size-allocate",
G_CALLBACK(OnAnchorAllocateThunk), this);
signals_.Connect(anchor_widget_, "destroy",
- G_CALLBACK(gtk_widget_destroyed), &anchor_widget_);
+ G_CALLBACK(OnAnchorDestroyThunk), this);
}
signals_.Connect(toplevel_window_, "configure-event",
G_CALLBACK(OnToplevelConfigureThunk), this);
signals_.Connect(toplevel_window_, "unmap-event",
G_CALLBACK(OnToplevelUnmapThunk), this);
- // Set |toplevel_window_| to NULL if it gets destroyed.
- signals_.Connect(toplevel_window_, "destroy",
- G_CALLBACK(gtk_widget_destroyed), &toplevel_window_);
+ signals_.Connect(window_, "destroy",
+ G_CALLBACK(OnToplevelDestroyThunk), this);
gtk_widget_show_all(window_);
@@ -668,3 +667,15 @@ void BubbleGtk::OnAnchorAllocate(GtkWidget* widget,
if (!UpdateArrowLocation(false))
MoveWindow();
}
+
+void BubbleGtk::OnAnchorDestroy(GtkWidget* widget) {
+ anchor_widget_ = NULL;
+ Close();
+ // |this| is deleted.
+}
+
+void BubbleGtk::OnToplevelDestroy(GtkWidget* widget) {
+ toplevel_window_ = NULL;
+ Close();
+ // |this| is deleted.
+}
« no previous file with comments | « chrome/browser/ui/gtk/bubble/bubble_gtk.h ('k') | chrome/browser/ui/gtk/zoom_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698