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

Unified Diff: ui/wm/core/window_modality_controller.cc

Issue 252673002: Fixed screen capture confirmation dialog to be either system or browser window modal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android build fix Created 6 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/ui/views/simple_message_box_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/window_modality_controller.cc
diff --git a/ui/wm/core/window_modality_controller.cc b/ui/wm/core/window_modality_controller.cc
index 2eca7e24131b0cdfba4b46a5c337c8ba8e36bcae..1df375b439aff85b6f91fe4560bff9ff80415274 100644
--- a/ui/wm/core/window_modality_controller.cc
+++ b/ui/wm/core/window_modality_controller.cc
@@ -184,6 +184,13 @@ bool WindowModalityController::ProcessLocatedEvent(aura::Window* target,
aura::Window* modal_transient_child = GetModalTransient(target);
if (modal_transient_child && (event->type() == ui::ET_MOUSE_PRESSED ||
event->type() == ui::ET_TOUCH_PRESSED)) {
+ // Activate top window if transient child window is window modal.
+ if (TransientChildIsWindowModal(modal_transient_child)) {
+ aura::Window* toplevel = GetToplevelWindow(target);
+ DCHECK(toplevel);
+ ActivateWindow(toplevel);
+ }
+
AnimateWindow(modal_transient_child, WINDOW_ANIMATION_TYPE_BOUNCE);
}
if (event->type() == ui::ET_TOUCH_CANCELLED)
« no previous file with comments | « chrome/browser/ui/views/simple_message_box_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698