Chromium Code Reviews| 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 b9f0716174218c55da9135bc75d63499fc4bc23a..6af53b0d51087aef4de3e49c876d2095aa3470a4 100644 |
| --- a/ui/aura/shared/compound_event_filter.cc |
| +++ b/ui/aura/shared/compound_event_filter.cc |
| @@ -6,6 +6,7 @@ |
| #include "ui/aura/client/activation_client.h" |
| #include "ui/aura/client/cursor_client.h" |
| +#include "ui/aura/client/drag_drop_client.h" |
| #include "ui/aura/env.h" |
| #include "ui/aura/focus_manager.h" |
| #include "ui/aura/root_window.h" |
| @@ -86,9 +87,17 @@ size_t CompoundEventFilter::GetFilterCount() const { |
| // CompoundEventFilter, private: |
| void CompoundEventFilter::UpdateCursor(Window* target, ui::MouseEvent* event) { |
| - client::CursorClient* client = |
| - client::GetCursorClient(target->GetRootWindow()); |
| - if (client) { |
| + // If drag and drap is in progress, let the drag drop client set the cursor |
| + // and does not set cursor here. |
|
Daniel Erat
2012/09/07 04:55:39
s/and does not set/instead of setting the/
mazda
2012/09/07 19:42:24
Done.
|
| + aura::RootWindow* root_window = target->GetRootWindow(); |
| + client::DragDropClient* drag_drop_client = |
| + client::GetDragDropClient(root_window); |
| + if (drag_drop_client && drag_drop_client->IsDragDropInProgress()) |
|
oshima
2012/09/07 19:52:01
just curious. Does drag and drop work on displays
mazda
2012/09/07 22:38:14
1x -> 2x works well, but it doesn't seems 2x -> 1x
|
| + return; |
| + |
| + client::CursorClient* cursor_client = |
| + client::GetCursorClient(root_window); |
| + if (cursor_client) { |
| gfx::NativeCursor cursor = target->GetCursor(event->location()); |
| if (event->flags() & ui::EF_IS_NON_CLIENT) { |
| int window_component = |
| @@ -96,7 +105,9 @@ void CompoundEventFilter::UpdateCursor(Window* target, ui::MouseEvent* event) { |
| cursor = CursorForWindowComponent(window_component); |
| } |
| - client->SetCursor(cursor); |
| + cursor_client->SetCursor(cursor); |
| + cursor_client->SetDeviceScaleFactor( |
| + root_window->AsRootWindowHostDelegate()->GetDeviceScaleFactor()); |
| } |
| } |