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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 14222019: Trying to activate a window in a workspace other than the current is ignored while a system modal d… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_client.h" 10 #include "ui/aura/client/activation_client.h"
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 if (window_ == gained_active) 801 if (window_ == gained_active)
802 GetWidget()->GetFocusManager()->RestoreFocusedView(); 802 GetWidget()->GetFocusManager()->RestoreFocusedView();
803 else if (window_ == lost_active) 803 else if (window_ == lost_active)
804 GetWidget()->GetFocusManager()->StoreFocusedView(true); 804 GetWidget()->GetFocusManager()->StoreFocusedView(true);
805 } 805 }
806 delegate_->OnNativeWidgetActivationChanged(window_ == gained_active); 806 delegate_->OnNativeWidgetActivationChanged(window_ == gained_active);
807 if (IsVisible() && GetWidget()->non_client_view()) 807 if (IsVisible() && GetWidget()->non_client_view())
808 GetWidget()->non_client_view()->SchedulePaint(); 808 GetWidget()->non_client_view()->SchedulePaint();
809 } 809 }
810 810
811 void NativeWidgetAura::OnWindowActivationRequestCompleted(
812 aura::Window* request_active, aura::Window* actual_active) {
813 }
814
811 //////////////////////////////////////////////////////////////////////////////// 815 ////////////////////////////////////////////////////////////////////////////////
812 // NativeWidgetAura, aura::client::FocusChangeObserver: 816 // NativeWidgetAura, aura::client::FocusChangeObserver:
813 817
814 void NativeWidgetAura::OnWindowFocused(aura::Window* gained_focus, 818 void NativeWidgetAura::OnWindowFocused(aura::Window* gained_focus,
815 aura::Window* lost_focus) { 819 aura::Window* lost_focus) {
816 if (window_ == gained_focus) { 820 if (window_ == gained_focus) {
817 // In aura, it is possible for child native widgets to take input and focus, 821 // In aura, it is possible for child native widgets to take input and focus,
818 // this differs from the behavior on windows. 822 // this differs from the behavior on windows.
819 if (GetWidget()->GetInputMethod()) // Null in tests. 823 if (GetWidget()->GetInputMethod()) // Null in tests.
820 GetWidget()->GetInputMethod()->OnFocus(); 824 GetWidget()->GetInputMethod()->OnFocus();
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 return aura::Env::GetInstance()->is_mouse_button_down(); 1039 return aura::Env::GetInstance()->is_mouse_button_down();
1036 } 1040 }
1037 1041
1038 // static 1042 // static
1039 bool NativeWidgetPrivate::IsTouchDown() { 1043 bool NativeWidgetPrivate::IsTouchDown() {
1040 return aura::Env::GetInstance()->is_touch_down(); 1044 return aura::Env::GetInstance()->is_touch_down();
1041 } 1045 }
1042 1046
1043 } // namespace internal 1047 } // namespace internal
1044 } // namespace views 1048 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698