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

Issue 155518: Make GTK file dialog box modal for parent window, instead of for the entire... (Closed)

Created:
11 years, 5 months ago by Evan Stade
Modified:
9 years, 6 months ago
Reviewers:
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

Make GTK file dialog box modal for parent window, instead of for the entire application. This works by adding the GtkWindow in BrowserWindowGtk to its own GtkWindowGroup and adding the SelectFile dialog to the same group. The following call to gtk_grab_add(...) makes the SelectFile dialog modal, but only to the windows within the same group. Similarly, the bookmark manager window is also added to its own unique GtkWindowGroup, so the import/export dialogs behave correctly. If I'm understanding things correctly, the GtkWindowGroup objects are reference counted once the have windows attached to them, and will delete themselves after all references to them are destroyed. I'm not sure how to verify this. Test: - Open two new chrome window: A and B - Open "Save file as..." dialog in window A - Verify that window A does not respond to keyboard or mouse events. - Verify that window B does responde to keyboard and mouse events. - Open "Save file as..." dialog in window B - Verify that window B does not respond to keyboard or mouse events. - Cancel dialog on window A. - Verify that window A starts responding to keyboard and mouse events. - Cancel dialog on window B. - Verify that window B starts responding to keyboard and mouse events. BUG=8727 patch by Mohit Muthanna <mmuthanna@google.com>; original review URL: http://codereview.chromium.org/149548 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=20667

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -6 lines) Patch
M chrome/browser/gtk/bookmark_manager_gtk.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/gtk/browser_window_gtk.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/gtk/dialogs_gtk.cc View 2 chunks +8 lines, -6 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698