diff options
author | rharrison@chromium.org <rharrison@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 10:33:51 +0000 |
---|---|---|
committer | rharrison@chromium.org <rharrison@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 10:33:51 +0000 |
commit | a4c5eb7e3f3787e50d1c7588e6f6a24ba475a0e4 (patch) | |
tree | a6d634c463c23c644176dafa087b18ddaaded77c /ash/wm | |
parent | 034c7b8754fc2b1313cb860ff48cd9a7f1a1375e (diff) | |
download | chromium_src-a4c5eb7e3f3787e50d1c7588e6f6a24ba475a0e4.zip chromium_src-a4c5eb7e3f3787e50d1c7588e6f6a24ba475a0e4.tar.gz chromium_src-a4c5eb7e3f3787e50d1c7588e6f6a24ba475a0e4.tar.bz2 |
This CL modifies the check that prevents shelf gestures from working in
fullscreen mode so that it allows gestures during immersive mode.
This also modifies the drag completion behaviour to keep the shelf in the
correct state while immersive.
BUG=chromium:224301
BUG=chromium:230039
TEST=Tested that swipe in/out works in immersive mode.
Tested that transitioning between immersive and non-immersive doesn't break
the shelf.
Tested that swiping doesn't work in traditional fullscreen mode.
Review URL: https://chromiumcodereview.appspot.com/14740012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201733 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm')
-rw-r--r-- | ash/wm/gestures/shelf_gesture_handler.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ash/wm/gestures/shelf_gesture_handler.cc b/ash/wm/gestures/shelf_gesture_handler.cc index aba69fd..2d3e9b9 100644 --- a/ash/wm/gestures/shelf_gesture_handler.cc +++ b/ash/wm/gestures/shelf_gesture_handler.cc @@ -12,6 +12,7 @@ #include "ash/shell.h" #include "ash/system/status_area_widget.h" #include "ash/wm/gestures/tray_gesture_handler.h" +#include "ash/wm/window_properties.h" #include "ash/wm/window_util.h" #include "ui/aura/window.h" #include "ui/compositor/layer.h" @@ -37,14 +38,17 @@ bool ShelfGestureHandler::ProcessGestureEvent(const ui::GestureEvent& event) { return false; } - // The gesture are disabled for fullscreen windows. - aura::Window* active = wm::GetActiveWindow(); - if (active && wm::IsWindowFullscreen(active)) + // TODO(oshima): Find the root window controller from event's location. + RootWindowController* controller = Shell::GetPrimaryRootWindowController(); + + ShelfLayoutManager* shelf = controller->GetShelfLayoutManager(); + + // The gesture are disabled for fullscreen windows that are not in immersive + // mode. + aura::Window* fullscreen = controller->GetFullscreenWindow(); + if (fullscreen && !shelf->FullscreenWithMinimalChrome()) return false; - // TODO(oshima): Find the root window controller from event's location. - ShelfLayoutManager* shelf = - Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) { drag_in_progress_ = true; shelf->StartGestureDrag(event); |