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

Unified Diff: ui/base/gtk/gtk_signal_registrar.cc

Issue 10961016: [gtk] re-acquire input grab on bubbles when another widget (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 | « ui/base/gtk/gtk_signal_registrar.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/gtk/gtk_signal_registrar.cc
diff --git a/ui/base/gtk/gtk_signal_registrar.cc b/ui/base/gtk/gtk_signal_registrar.cc
index 9a5846e7cdf2de07a744cce4b763d4cfc523b00e..82527e8258bbf6f01a9b42c5d334a8d7fe18ef45 100644
--- a/ui/base/gtk/gtk_signal_registrar.cc
+++ b/ui/base/gtk/gtk_signal_registrar.cc
@@ -23,8 +23,8 @@ GtkSignalRegistrar::~GtkSignalRegistrar() {
HandlerList& handlers = list_iter->second;
for (HandlerList::iterator ids_iter = handlers.begin();
- ids_iter != handlers.end(); ids_iter++) {
- g_signal_handler_disconnect(list_iter->first, *ids_iter);
+ ids_iter != handlers.end(); ++ids_iter) {
+ g_signal_handler_disconnect(object, *ids_iter);
}
}
}
@@ -78,4 +78,21 @@ void GtkSignalRegistrar::WeakNotify(GObject* where_the_object_was) {
handler_lists_.erase(iter);
}
+void GtkSignalRegistrar::DisconnectAll(gpointer instance) {
+ GObject* object = G_OBJECT(instance);
+ HandlerMap::iterator iter = handler_lists_.find(object);
+ if (iter == handler_lists_.end())
+ return;
+
+ GObjectDestructorFILO::GetInstance()->Disconnect(
+ object, WeakNotifyThunk, this);
+ HandlerList& handlers = iter->second;
+ for (HandlerList::iterator ids_iter = handlers.begin();
+ ids_iter != handlers.end(); ++ids_iter) {
+ g_signal_handler_disconnect(object, *ids_iter);
+ }
+
+ handler_lists_.erase(iter);
+}
+
} // namespace ui
« no previous file with comments | « ui/base/gtk/gtk_signal_registrar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698