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

Unified Diff: chrome/browser/gtk/options/options_window_gtk.cc

Issue 1727012: GTK: Put options dialogs in a different window group. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 8 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/gtk/options/fonts_languages_window_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/options/options_window_gtk.cc
diff --git a/chrome/browser/gtk/options/options_window_gtk.cc b/chrome/browser/gtk/options/options_window_gtk.cc
index 80b82f4c0c6079c0c08a8cc591512ef8fa2e1ca1..3b370eb0a28aaa7fd9a45b7fd8d78ebe690f741b 100644
--- a/chrome/browser/gtk/options/options_window_gtk.cc
+++ b/chrome/browser/gtk/options/options_window_gtk.cc
@@ -171,6 +171,13 @@ OptionsWindowGtk::OptionsWindowGtk(Profile* profile)
b->window()->GetNativeHandle());
}
+ // Now that we're centered over the browser, we add our dialog to its own
+ // window group. We don't do anything with the response and we don't want the
+ // options window's modal dialogs to be associated with the main browser
+ // window because gtk grabs work on a per window group basis.
+ gtk_window_group_add_window(gtk_window_group_new(), GTK_WINDOW(dialog_));
+ g_object_unref(gtk_window_get_group(GTK_WINDOW(dialog_)));
+
g_signal_connect(notebook_, "switch-page", G_CALLBACK(OnSwitchPage), this);
// We only have one button and don't do any special handling, so just hook it
« no previous file with comments | « chrome/browser/gtk/options/fonts_languages_window_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698