| 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 2f51f63eab0f5fa4399a1bd134ac0b6b73175e22..0471819c91b1084a294dab669077d3bfb9b4485b 100644
|
| --- a/ui/aura/shared/compound_event_filter.cc
|
| +++ b/ui/aura/shared/compound_event_filter.cc
|
| @@ -37,7 +37,7 @@ Window* GetActiveWindow(Window* window) {
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // CompoundEventFilter, public:
|
|
|
| -CompoundEventFilter::CompoundEventFilter() : update_cursor_visibility_(true) {
|
| +CompoundEventFilter::CompoundEventFilter() : cursor_hidden_by_filter_(false) {
|
| }
|
|
|
| CompoundEventFilter::~CompoundEventFilter() {
|
| @@ -147,11 +147,19 @@ ui::TouchStatus CompoundEventFilter::FilterTouchEvent(
|
| void CompoundEventFilter::SetCursorVisibilityOnEvent(aura::Window* target,
|
| ui::Event* event,
|
| bool show) {
|
| - if (update_cursor_visibility_ && !(event->flags() & ui::EF_IS_SYNTHESIZED)) {
|
| + if (!(event->flags() & ui::EF_IS_SYNTHESIZED)) {
|
| client::CursorClient* client =
|
| client::GetCursorClient(target->GetRootWindow());
|
| - if (client)
|
| - client->ShowCursor(show);
|
| + if (client) {
|
| + if (show && cursor_hidden_by_filter_) {
|
| + cursor_hidden_by_filter_ = false;
|
| + client->ShowCursor(true);
|
| + } else if (client->IsCursorVisible() && !show &&
|
| + !cursor_hidden_by_filter_) {
|
| + cursor_hidden_by_filter_ = true;
|
| + client->ShowCursor(false);
|
| + }
|
| + }
|
| }
|
| }
|
|
|
|
|