зеркало из https://github.com/mozilla/gecko-dev.git
Bug 584235 - Fennec not resized correctly in portrait mode on Meego. r=dougt
--HG-- extra : rebase_source : c8de990692ab09ea8b46fabdd21e1ecbbfbaa5c6
This commit is contained in:
Родитель
a1d86c3bae
Коммит
f2e32993a3
|
@ -43,7 +43,13 @@
|
|||
#include <qdesktopwidget.h>
|
||||
#include <qapplication.h>
|
||||
|
||||
#ifdef MOZ_ENABLE_MEEGOTOUCH
|
||||
#include <MApplication>
|
||||
#include <MApplicationWindow>
|
||||
#endif
|
||||
|
||||
#include "nsScreenQt.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
nsScreenQt::nsScreenQt(int aScreen)
|
||||
: mScreen(aScreen)
|
||||
|
@ -65,7 +71,18 @@ NS_IMETHODIMP
|
|||
nsScreenQt::GetRect(PRInt32 *outLeft,PRInt32 *outTop,
|
||||
PRInt32 *outWidth,PRInt32 *outHeight)
|
||||
{
|
||||
QRect r = QApplication::desktop()->screenGeometry(mScreen);
|
||||
QRect r;
|
||||
#ifdef MOZ_ENABLE_MEEGOTOUCH
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
MWindow *window = MApplication::activeWindow();
|
||||
if (window) {
|
||||
QSize aSceneSize = window->visibleSceneSize();
|
||||
r = QRect(QPoint(), aSceneSize);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
r = QApplication::desktop()->screenGeometry(mScreen);
|
||||
|
||||
*outTop = r.x();
|
||||
*outLeft = r.y();
|
||||
*outWidth = r.width();
|
||||
|
|
|
@ -1813,6 +1813,9 @@ nsWindow::NativeResize(PRInt32 aX, PRInt32 aY,
|
|||
mNeedsMove = PR_FALSE;
|
||||
|
||||
if (mIsTopLevel) {
|
||||
#ifdef MOZ_ENABLE_MEEGOTOUCH
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default)
|
||||
#endif
|
||||
GetViewWidget()->setGeometry(aX, aY, aWidth, aHeight);
|
||||
}
|
||||
mWidget->setGeometry(aX, aY, aWidth, aHeight);
|
||||
|
|
Загрузка…
Ссылка в новой задаче