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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 19882003: desktop aura: Fix multiple ibeams in the omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 52821722963fb0715e30e8779d3555a059d5c97b..207e655e0e65b62a2f4262df6ff4b7748c4aef9e 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "ui/aura/client/activation_client.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/stacking_client.h"
#include "ui/aura/focus_manager.h"
#include "ui/aura/root_window.h"
@@ -166,7 +167,8 @@ DesktopNativeWidgetAura::DesktopNativeWidgetAura(
window_(new aura::Window(this)),
native_widget_delegate_(delegate),
last_drop_operation_(ui::DragDropTypes::DRAG_NONE),
- restore_focus_on_activate_(false) {
+ restore_focus_on_activate_(false),
+ cursor_(gfx::kNullCursor) {
window_->SetProperty(kDesktopNativeWidgetAuraKey, this);
aura::client::SetFocusChangeObserver(window_, this);
aura::client::SetActivationChangeObserver(window_, this);
@@ -550,11 +552,17 @@ void DesktopNativeWidgetAura::SchedulePaintInRect(const gfx::Rect& rect) {
}
void DesktopNativeWidgetAura::SetCursor(gfx::NativeCursor cursor) {
- desktop_root_window_host_->AsRootWindowHost()->SetCursor(cursor);
+ cursor_ = cursor;
+ aura::client::CursorClient* cursor_client =
+ aura::client::GetCursorClient(window_->GetRootWindow());
+ if (cursor_client)
+ cursor_client->SetCursor(cursor);
}
bool DesktopNativeWidgetAura::IsMouseEventsEnabled() const {
- return true;
+ aura::client::CursorClient* cursor_client =
+ aura::client::GetCursorClient(window_->GetRootWindow());
+ return cursor_client ? cursor_client->IsMouseEventsEnabled() : true;
}
void DesktopNativeWidgetAura::ClearNativeFocus() {
@@ -619,7 +627,7 @@ void DesktopNativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds,
}
gfx::NativeCursor DesktopNativeWidgetAura::GetCursor(const gfx::Point& point) {
- return gfx::kNullCursor;
+ return cursor_;
}
int DesktopNativeWidgetAura::GetNonClientComponent(
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698