bug 508501 - titlebar and SIP button visible after re-activating window r=vlad,dolske

This commit is contained in:
Brad Lassey 2009-08-13 13:34:17 -07:00
parent bc13f26665
commit ff023cb568
3 changed files with 15 additions and 1 deletions

View File

@ -3929,6 +3929,12 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
#if defined(WINCE_HAVE_SOFTKB)
if (mIsTopWidgetWindow && sSoftKeyboardState)
nsWindowCE::ToggleSoftKB(fActive);
if (nsWindowCE::sShowSIPButton != TRI_TRUE && WA_INACTIVE != fActive) {
HWND hWndSIPB = FindWindowW(L"MS_SIPBUTTON", NULL );
if (hWndSIPB)
ShowWindow(hWndSIPB, SW_HIDE);
}
#endif
if (WA_INACTIVE == fActive) {

View File

@ -64,6 +64,7 @@
#if defined(WINCE_HAVE_SOFTKB)
PRBool nsWindow::sSoftKeyMenuBar = PR_FALSE;
PRBool nsWindow::sSoftKeyboardState = PR_FALSE;
PRBool nsWindowCE::sSIPInTransition = PR_FALSE;
TriStateBool nsWindowCE::sShowSIPButton = TRI_UNKNOWN;
#endif
@ -103,6 +104,7 @@ void nsWindowCE::NotifySoftKbObservers(LPRECT visRect)
void nsWindowCE::ToggleSoftKB(PRBool show)
{
sSIPInTransition = PR_TRUE;
HWND hWndSIP = FindWindowW(L"SipWndClass", NULL );
if (hWndSIP)
ShowWindow(hWndSIP, show ? SW_SHOW: SW_HIDE);
@ -156,6 +158,7 @@ void nsWindowCE::ToggleSoftKB(PRBool show)
} else {
NotifySoftKbObservers();
}
sSIPInTransition = PR_FALSE;
}
void nsWindowCE::CreateSoftKeyMenuBar(HWND wnd)
@ -351,7 +354,11 @@ DWORD nsWindow::WindowStyle()
// Maximize, minimize or restore the window.
NS_IMETHODIMP nsWindow::SetSizeMode(PRInt32 aMode)
{
if (aMode == 0 && mSizeMode == 3 && nsWindowCE::sSIPInTransition) {
// ignore the size mode being set to normal by the SIP resizing us
return NS_OK;
}
nsresult rv;
// Let's not try and do anything if we're already in that state.

View File

@ -87,6 +87,7 @@ public:
static void ToggleSoftKB(PRBool show);
static void CreateSoftKeyMenuBar(HWND wnd);
static void NotifySoftKbObservers(LPRECT = NULL);
static PRBool sSIPInTransition;
static TriStateBool sShowSIPButton;
#endif
};