Chromium Code Reviews| Index: ash/wm/gestures/shelf_gesture_handler.cc |
| diff --git a/ash/wm/gestures/shelf_gesture_handler.cc b/ash/wm/gestures/shelf_gesture_handler.cc |
| index 847820d3ea71cfbdccdbd977e4b2038a2f64dc71..d85c543f8b97ad9a2b8976ee3cc353a255e982d5 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,16 @@ 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(); |
| + |
| + // The gesture are disabled for fullscreen windows that are not in immersive |
| + // mode. |
| + aura::Window* fullscreen = controller->GetFullscreenWindow(); |
| + if (fullscreen && !fullscreen->GetProperty(kFullscreenUsesMinimalChromeKey)) |
|
James Cook
2013/05/22 12:04:22
Can this share code with IsInImmersiveMode / Fulls
rharrison
2013/05/22 20:20:02
Done.
|
| return false; |
| - // TODO(oshima): Find the root window controller from event's location. |
| - ShelfLayoutManager* shelf = |
| - Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); |
| + ShelfLayoutManager* shelf = controller->GetShelfLayoutManager(); |
| if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) { |
| drag_in_progress_ = true; |
| shelf->StartGestureDrag(event); |