diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-20 05:39:33 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-20 05:39:33 +0000 |
commit | a9233d0fe48e115c20803388badaf2038036e4cb (patch) | |
tree | 75991de6d752c4014b868f459598ed9feeabfad0 | |
parent | 5dfbf1abfc81152f4e10539f99ce37ce19116aa1 (diff) | |
download | chromium_src-a9233d0fe48e115c20803388badaf2038036e4cb.zip chromium_src-a9233d0fe48e115c20803388badaf2038036e4cb.tar.gz chromium_src-a9233d0fe48e115c20803388badaf2038036e4cb.tar.bz2 |
Make sure that the window is repositioned and if applicable visible before reparenting it.
This is to workaround a strange behavior in Windows, where if the parent window is from
a different thread and the window becomes visible after reparenting it, the thread inputs
are not attached correctly causing focus and other issues.
Review URL: http://codereview.chromium.org/67292
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14025 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index bac531e5..ba4dfe4 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -2837,15 +2837,15 @@ void AutomationProvider::OnTabReposition( return; } + SetWindowPos(params.window, params.window_insert_after, params.left, + params.top, params.width, params.height, params.flags); + if (params.set_parent) { if (IsWindow(params.parent_window)) { if (!SetParent(params.window, params.parent_window)) DLOG(WARNING) << "SetParent failed. Error 0x%x" << GetLastError(); } } - - SetWindowPos(params.window, params.window_insert_after, params.left, - params.top, params.width, params.height, params.flags); } #endif // defined(OS_WIN) |