From bd438f029189706ad5a36467954ad19350ac8f9a Mon Sep 17 00:00:00 2001 From: Brad Lassey Date: Wed, 2 Sep 2009 17:23:24 -0400 Subject: [PATCH] bug 514007 - titlebar pops over window when switching orientation on HTC touch pro r=dougt --- widget/src/windows/nsWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index df7a9f9c14fb..04a4b7f1ada6 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -4185,6 +4185,16 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam, case SPI_SETCURRENTIM: nsWindowCE::NotifySoftKbObservers(); break; + case SETTINGCHANGE_RESET: + if (mWindowType == eWindowType_invisible) { + // The OS sees to get confused and think that the invisable window + // is in the foreground after an orientation change. By actually + // setting it to the foreground and hiding it, we set it strait. + // See bug 514007 for details. + SetForegroundWindow(mWnd); + ShowWindow(mWnd, SW_HIDE); + } + break; } #endif OnSettingsChange(wParam, lParam);