зеркало из https://github.com/mozilla/gecko-dev.git
bug 544887 - Soft keyboard pop-up is on top of search engine bar in the awesome bar on first run r=dougt
This commit is contained in:
Родитель
0e16484774
Коммит
87a5a3f217
|
@ -2139,20 +2139,45 @@ nsWindow::MakeFullScreen(PRBool aFullScreen)
|
||||||
RECT rc;
|
RECT rc;
|
||||||
if (aFullScreen) {
|
if (aFullScreen) {
|
||||||
SetForegroundWindow(mWnd);
|
SetForegroundWindow(mWnd);
|
||||||
SHFullScreen(mWnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
|
if (nsWindowCE::sMenuBarShown) {
|
||||||
SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
|
SIPINFO sipInfo;
|
||||||
|
memset(&sipInfo, 0, sizeof(SIPINFO));
|
||||||
|
sipInfo.cbSize = sizeof(SIPINFO);
|
||||||
|
if (SipGetInfo(&sipInfo))
|
||||||
|
SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXSCREEN),
|
||||||
|
sipInfo.rcVisibleDesktop.bottom);
|
||||||
|
else
|
||||||
|
SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXSCREEN),
|
||||||
|
GetSystemMetrics(SM_CYSCREEN));
|
||||||
|
RECT menuBarRect;
|
||||||
|
if (GetWindowRect(nsWindowCE::sSoftKeyMenuBarHandle, &menuBarRect) &&
|
||||||
|
menuBarRect.top < rc.bottom)
|
||||||
|
rc.bottom = menuBarRect.top;
|
||||||
|
SHFullScreen(mWnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_SHOWSIPBUTTON);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
SHFullScreen(mWnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
|
||||||
|
SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SHFullScreen(mWnd, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON);
|
SHFullScreen(mWnd, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON);
|
||||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, FALSE);
|
SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, FALSE);
|
||||||
}
|
}
|
||||||
MoveWindow(mWnd, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, TRUE);
|
|
||||||
|
|
||||||
if (aFullScreen)
|
if (aFullScreen)
|
||||||
mSizeMode = nsSizeMode_Fullscreen;
|
mSizeMode = nsSizeMode_Fullscreen;
|
||||||
#endif
|
|
||||||
|
// nsBaseWidget hides the chrome and resizes the window, replicate that here
|
||||||
|
HideWindowChrome(aFullScreen);
|
||||||
|
Resize(rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, PR_TRUE);
|
||||||
|
|
||||||
|
return NS_OK;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
return nsBaseWidget::MakeFullScreen(aFullScreen);
|
return nsBaseWidget::MakeFullScreen(aFullScreen);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************
|
/**************************************************************
|
||||||
|
|
|
@ -92,13 +92,15 @@ public:
|
||||||
static void CheckKeyboardStatus();
|
static void CheckKeyboardStatus();
|
||||||
static TriStateBool GetSliderStateOpen();
|
static TriStateBool GetSliderStateOpen();
|
||||||
static void ResetSoftKB(HWND wnd);
|
static void ResetSoftKB(HWND wnd);
|
||||||
|
protected:
|
||||||
|
static PRBool sMenuBarShown;
|
||||||
|
static HWND sSoftKeyMenuBarHandle;
|
||||||
private:
|
private:
|
||||||
static TriStateBool sHardKBPresence;
|
static TriStateBool sHardKBPresence;
|
||||||
static HWND sSoftKeyMenuBarHandle;
|
|
||||||
static RECT sDefaultSIPRect;
|
static RECT sDefaultSIPRect;
|
||||||
static HWND sMainWindowHandle;
|
static HWND sMainWindowHandle;
|
||||||
static PRBool sMenuBarShown;
|
|
||||||
#endif
|
#endif
|
||||||
|
friend class nsWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* WINCE */
|
#endif /* WINCE */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче