Commit 23ae0592 authored by dcheng@chromium.org's avatar dcheng@chromium.org

Hack to fix Panel focus issues on Mac.

This is just a temporary workaround for dogfood.

BUG=97831
TEST=test app on crbug.com/101413


Review URL: http://codereview.chromium.org/8393014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107634 0039d316-1c4b-4281-b951-d872f2087c98
parent 1c1977cc
......@@ -187,6 +187,17 @@ enum {
// Shows the window without making it key, on top of its layer, even if
// Chromium is not an active app.
[window orderFrontRegardless];
// TODO(dcheng): Temporary hack to work around the fact that
// orderFrontRegardless causes us to become the first responder. The usual
// Chrome assumption is that becoming the first responder = you have focus, so
// we always deactivate the controls here. If we're created as an active
// panel, we'll get a NSWindowDidBecomeKeyNotification and reactivate the web
// view properly. See crbug.com/97831 for more details.
TabContents* tab_contents =
windowShim_->panel()->browser()->GetSelectedTabContents();
// RWHV may be NULL in unit tests.
if (tab_contents && tab_contents->GetRenderWidgetHostView())
tab_contents->GetRenderWidgetHostView()->SetActive(false);
[window setFrame:frame display:YES animate:YES];
[contentView setAutoresizesSubviews:YES];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment