summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 04:08:07 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 04:08:07 +0000
commitdeb6e0ed6dd06c90044b0ba199149872fd60b75f (patch)
tree07150c1ca0777cfc9a166e31513280bb243d715f
parent05bd7d87a6e8e823967aa63ced14328c5c6cb37b (diff)
downloadchromium_src-deb6e0ed6dd06c90044b0ba199149872fd60b75f.zip
chromium_src-deb6e0ed6dd06c90044b0ba199149872fd60b75f.tar.gz
chromium_src-deb6e0ed6dd06c90044b0ba199149872fd60b75f.tar.bz2
When you launch Chrome from a desktop shortcut, the window wasn't getting activated because I removed code to explicitly activate the window in my change earlier today
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10780 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/views/window.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/views/window.cc b/chrome/views/window.cc
index 404dc0e..d0875d8 100644
--- a/chrome/views/window.cc
+++ b/chrome/views/window.cc
@@ -127,8 +127,18 @@ void Window::Show(int show_state) {
// always first call ShowWindow with the specified value from STARTUPINFO,
// otherwise all future ShowWindow calls will be ignored (!!#@@#!). Instead,
// we call ShowWindow again in this case.
- if (show_state == SW_HIDE)
- ShowWindow(SW_SHOWNORMAL);
+ if (show_state == SW_HIDE) {
+ show_state = SW_SHOWNORMAL;
+ ShowWindow(show_state);
+ }
+
+ // We need to explicitly activate the window if we've been shown with a state
+ // that should activate, because if we're opened from a desktop shortcut while
+ // an existing window is already running it doesn't seem to be enough to use
+ // one of these flags to activate the window.
+ if (show_state == SW_SHOWNORMAL)
+ Activate();
+
SetInitialFocus();
}