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

Unified Diff: ui/aura/shared/compound_event_filter.cc

Issue 10692170: Aura desktop: Show resize cursors again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 8 years, 5 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 | « ui/aura/shared/compound_event_filter.h ('k') | ui/aura/shared/compound_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/shared/compound_event_filter.cc
diff --git a/ui/aura/shared/compound_event_filter.cc b/ui/aura/shared/compound_event_filter.cc
index f32d480da3106440ebc3d968bdb68fd951f426bb..4bc8866eb8e99934dd2eb86f9bbb6a819142bc5d 100644
--- a/ui/aura/shared/compound_event_filter.cc
+++ b/ui/aura/shared/compound_event_filter.cc
@@ -5,7 +5,7 @@
#include "ui/aura/shared/compound_event_filter.h"
#include "ui/aura/client/activation_client.h"
-#include "ui/aura/cursor_manager.h"
+#include "ui/aura/client/cursor_client.h"
#include "ui/aura/env.h"
#include "ui/aura/event.h"
#include "ui/aura/focus_manager.h"
@@ -103,7 +103,7 @@ bool CompoundEventFilter::PreHandleMouseEvent(aura::Window* target,
if (event->type() == ui::ET_MOUSE_MOVED ||
event->type() == ui::ET_MOUSE_PRESSED ||
event->type() == ui::ET_MOUSEWHEEL) {
- SetVisibilityOnEvent(event, true);
+ SetVisibilityOnEvent(target, event, true);
UpdateCursor(target, event);
}
@@ -145,7 +145,7 @@ ui::GestureStatus CompoundEventFilter::PreHandleGestureEvent(
event->details().touch_points() == 1 &&
target->GetRootWindow() &&
GetActiveWindow(target) != target) {
- SetVisibilityOnEvent(event, false);
+ SetVisibilityOnEvent(target, event, false);
target->GetFocusManager()->SetFocusedWindow(
FindFocusableWindowFor(target), event);
}
@@ -157,14 +157,19 @@ ui::GestureStatus CompoundEventFilter::PreHandleGestureEvent(
// CompoundEventFilter, private:
void CompoundEventFilter::UpdateCursor(aura::Window* target,
- aura::MouseEvent* event) {
- gfx::NativeCursor cursor = target->GetCursor(event->location());
- if (event->flags() & ui::EF_IS_NON_CLIENT) {
- int window_component =
- target->delegate()->GetNonClientComponent(event->location());
- cursor = CursorForWindowComponent(window_component);
+ aura::MouseEvent* event) {
+ aura::client::CursorClient* client =
+ aura::client::GetCursorClient(target->GetRootWindow());
+ if (client) {
+ gfx::NativeCursor cursor = target->GetCursor(event->location());
+ if (event->flags() & ui::EF_IS_NON_CLIENT) {
+ int window_component =
+ target->delegate()->GetNonClientComponent(event->location());
+ cursor = CursorForWindowComponent(window_component);
+ }
+
+ client->SetCursor(cursor);
}
- Env::GetInstance()->cursor_manager()->SetCursor(cursor);
}
bool CompoundEventFilter::FilterKeyEvent(aura::Window* target,
@@ -206,10 +211,15 @@ ui::TouchStatus CompoundEventFilter::FilterTouchEvent(
return status;
}
-void CompoundEventFilter::SetVisibilityOnEvent(aura::LocatedEvent* event,
- bool show) {
- if (update_cursor_visibility_ && !(event->flags() & ui::EF_IS_SYNTHESIZED))
- Env::GetInstance()->cursor_manager()->ShowCursor(show);
+void CompoundEventFilter::SetVisibilityOnEvent(aura::Window* target,
+ aura::LocatedEvent* event,
+ bool show) {
+ if (update_cursor_visibility_ && !(event->flags() & ui::EF_IS_SYNTHESIZED)) {
+ aura::client::CursorClient* client =
+ aura::client::GetCursorClient(target->GetRootWindow());
+ if (client)
+ client->ShowCursor(show);
+ }
}
} // namespace shared
« no previous file with comments | « ui/aura/shared/compound_event_filter.h ('k') | ui/aura/shared/compound_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698