summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 02:10:35 +0000
committerzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 02:10:35 +0000
commitca5e056c70fc697824da61bc7de94cfa92b87cc4 (patch)
tree3c58068f317550ae967ceabce4e195e11c36a1aa /ui
parenta9e390c49aa040569fbfb76f6fb3e601658338df (diff)
downloadchromium_src-ca5e056c70fc697824da61bc7de94cfa92b87cc4.zip
chromium_src-ca5e056c70fc697824da61bc7de94cfa92b87cc4.tar.gz
chromium_src-ca5e056c70fc697824da61bc7de94cfa92b87cc4.tar.bz2
Fixed screen capture confirmation dialog to be either system- or window-modal depending on where it got initiated from. Previous implementation created window-modal with no parent window which allowed it to hide underneath its browser window.
Fixed handling of window-modal dialogs. Modal dialogs and their toplevel parent windows weren't properly activated on events (i.e. mouse click) that happen in toplevel parent windows area but outside of the modal dialog. TEST=added WindowModalityControllerTest.EventsForEclipsedWindows, manual: start go/present/<whatever>, try to alt-tab away from the pop up dialog, try to eclipse it with another browser window BUG=366956 Review URL: https://codereview.chromium.org/252673002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266319 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/wm/core/window_modality_controller.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/wm/core/window_modality_controller.cc b/ui/wm/core/window_modality_controller.cc
index 2eca7e2..1df375b 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)