mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-15 13:09:14 +00:00
Bug 645659 - To early rotation implementation in fennec-qt code cause breakage. r=romaxa
This commit is contained in:
parent
61d692cb10
commit
dbb04fcf98
@ -266,17 +266,6 @@ nsWindow::nsWindow()
|
||||
gSwipeGestureId = QGestureRecognizer::registerRecognizer(swipeRecognizer);
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_QTMOBILITY
|
||||
if (!gOrientation) {
|
||||
gOrientation = new QOrientationSensor();
|
||||
gOrientation->addFilter(&gOrientationFilter);
|
||||
gOrientation->start();
|
||||
if (!gOrientation->isActive()) {
|
||||
qWarning("Orientationsensor didn't start!");
|
||||
}
|
||||
gOrientationFilter.filter(gOrientation->reading());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline gfxASurface::gfxImageFormat
|
||||
@ -2638,10 +2627,6 @@ nsWindow::createQWidget(MozQWidget *parent, nsWidgetInitData *aInitData)
|
||||
newView->viewport()->setAttribute(Qt::WA_PaintOnScreen, true);
|
||||
newView->viewport()->setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
}
|
||||
#ifdef MOZ_ENABLE_QTMOBILITY
|
||||
QObject::connect((QObject*) &gOrientationFilter, SIGNAL(orientationChanged()),
|
||||
widget, SLOT(orientationChanged()));
|
||||
#endif
|
||||
// Enable gestures:
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 0))
|
||||
newView->viewport()->grabGesture(Qt::PinchGesture);
|
||||
@ -2848,6 +2833,27 @@ nsWindow::Show(PRBool aState)
|
||||
|
||||
mIsShown = aState;
|
||||
|
||||
#ifdef MOZ_ENABLE_QTMOBILITY
|
||||
if (mWidget &&
|
||||
(mWindowType == eWindowType_toplevel ||
|
||||
mWindowType == eWindowType_dialog ||
|
||||
mWindowType == eWindowType_popup))
|
||||
{
|
||||
if (!gOrientation) {
|
||||
gOrientation = new QOrientationSensor();
|
||||
gOrientation->addFilter(&gOrientationFilter);
|
||||
gOrientation->start();
|
||||
if (!gOrientation->isActive()) {
|
||||
qWarning("Orientationsensor didn't start!");
|
||||
}
|
||||
gOrientationFilter.filter(gOrientation->reading());
|
||||
|
||||
QObject::connect((QObject*) &gOrientationFilter, SIGNAL(orientationChanged()),
|
||||
mWidget, SLOT(orientationChanged()));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((aState && !AreBoundsSane()) || !mWidget) {
|
||||
LOG(("\tbounds are insane or window hasn't been created yet\n"));
|
||||
mNeedsShow = PR_TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user