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

Unified Diff: chrome/views/window.cc

Issue 27190: Makes it so windows opened from links in Windows Live Messenger cause the win... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/window.cc
===================================================================
--- chrome/views/window.cc (revision 10371)
+++ chrome/views/window.cc (working copy)
@@ -83,7 +83,6 @@
void Window::Show() {
int show_state = GetShowState();
- bool maximized = false;
if (saved_maximized_state_)
show_state = SW_SHOWMAXIMIZED;
Show(show_state);
@@ -91,6 +90,14 @@
void Window::Show(int show_state) {
ShowWindow(show_state);
+ // When launched from certain programs like bash and Windows Live Messenger,
+ // show_state is set to SW_HIDE, so we need to correct that condition. We
+ // don't just change show_state to SW_SHOWNORMAL because MSDN says we must
+ // 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);
SetInitialFocus();
}
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698