diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-09 21:34:09 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-09 21:34:09 +0000 |
commit | 2cc8659825a00e8d454c9f0ff1150794a40e5871 (patch) | |
tree | 9b94de5204923c9d684b6fcda3972232095612e2 /ui | |
parent | 4f05c2a2591d1902df59169a40f09b8a5c8f0ca8 (diff) | |
download | chromium_src-2cc8659825a00e8d454c9f0ff1150794a40e5871.zip chromium_src-2cc8659825a00e8d454c9f0ff1150794a40e5871.tar.gz chromium_src-2cc8659825a00e8d454c9f0ff1150794a40e5871.tar.bz2 |
Revert 136124 - Allow the RWHVW to be focused when a window is restored from minimized.
This restores a hack that was in place in the old NativeTabContentsContainer code that seemed to clear focus during restoration (though the hack was for another purpose, the hack seemed to fix this bug too). I've isolated the hack to the re-activation code.
http://crbug.com/125976
TEST=see bug
Review URL: https://chromiumcodereview.appspot.com/10378043
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10377070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136128 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/views/accessible_pane_view_unittest.cc | 3 | ||||
-rw-r--r-- | ui/views/widget/native_widget_win.cc | 14 |
2 files changed, 0 insertions, 17 deletions
diff --git a/ui/views/accessible_pane_view_unittest.cc b/ui/views/accessible_pane_view_unittest.cc index 14b0226..467f143 100644 --- a/ui/views/accessible_pane_view_unittest.cc +++ b/ui/views/accessible_pane_view_unittest.cc @@ -84,7 +84,6 @@ TEST_F(AccessiblePaneViewTest, SimpleSetPaneFocus) { View* root = widget->GetRootView(); root->AddChildView(test_view); widget->Show(); - widget->Activate(); // Set pane focus succeeds, focus on child. EXPECT_TRUE(test_view->SetPaneFocusAndFocusDefault()); @@ -114,7 +113,6 @@ TEST_F(AccessiblePaneViewTest, TwoSetPaneFocus) { root->AddChildView(test_view); root->AddChildView(test_view_2); widget->Show(); - widget->Activate(); // Set pane focus succeeds, focus on child. EXPECT_TRUE(test_view->SetPaneFocusAndFocusDefault()); @@ -144,7 +142,6 @@ TEST_F(AccessiblePaneViewTest, PaneFocusTraversal) { root->AddChildView(original_test_view); root->AddChildView(test_view); widget->Show(); - widget->Activate(); // Set pane focus on first view. EXPECT_TRUE(original_test_view->SetPaneFocus( diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc index 2fcc5dd..1cbc98b 100644 --- a/ui/views/widget/native_widget_win.cc +++ b/ui/views/widget/native_widget_win.cc @@ -38,7 +38,6 @@ #include "ui/views/drag_utils.h" #include "ui/views/focus/accelerator_handler.h" #include "ui/views/focus/view_storage.h" -#include "ui/views/focus/widget_focus_manager.h" #include "ui/views/ime/input_method_win.h" #include "ui/views/views_delegate.h" #include "ui/views/widget/aero_tooltip_manager.h" @@ -1337,7 +1336,6 @@ LRESULT NativeWidgetWin::OnCreate(CREATESTRUCT* create_struct) { // Get access to a modifiable copy of the system menu. GetSystemMenu(hwnd(), false); - return 0; } @@ -2261,18 +2259,6 @@ void NativeWidgetWin::PostProcessActivateMessage(NativeWidgetWin* widget, widget->restore_focus_when_enabled_ = true; return; } - - // Mysteriously, this only appears to be needed support restoration of focus - // to a child hwnd when restoring its top level window from the minimized - // state. If we don't do this, then ::SetFocus() to that child HWND returns - // ERROR_INVALID_PARAMETER, despite both HWNDs being of the same thread. - // See http://crbug.com/125976 - { - // Since this is a synthetic reset, we don't need to tell anyone about it. - AutoNativeNotificationDisabler disabler; - focus_manager->ClearFocus(); - } - focus_manager->RestoreFocusedView(); } } |