-void FullScreenWindow::resizeEvent(QResizeEvent *e)
-{
- restoreButton->setGeometry(fullScreenZone());
- QMainWindow::resizeEvent(e);
+ QRect screen = QApplication::desktop()->screenGeometry();
+ int w = screen.width();
+ int h = screen.height();
+
+#ifdef Q_WS_MAEMO_5
+ // Hack: FullScreenWindow can lose orientation on Maemo...
+ QString orientation = Settings::instance()->value("orientation",
+ Platform::instance()->defaultOrientation()).toString();
+ if (((orientation == "portrait") && (w > h)) ||
+ ((orientation == "landscape") && (w < h))) {
+ int tmp = w;
+ w = h;
+ h = tmp;
+ }
+#endif // Q_WS_MAEMO_5
+
+ restoreButton->setGeometry(
+ w - TranslucentButton::pixels - MARGIN,
+ h - TranslucentButton::pixels - MARGIN,
+ TranslucentButton::pixels,
+ TranslucentButton::pixels);
+ restoreButton->flash(3000);