author | ar <ar> | 2005-03-10 16:21:07 (UTC) |
---|---|---|
committer | ar <ar> | 2005-03-10 16:21:07 (UTC) |
commit | 3bf4809c4f2263f0130472c41aa6c85e46e61db9 (patch) (side-by-side diff) | |
tree | 82c34fddb63bb6ca8cbd53709ab2642795241d38 | |
parent | 95a99e7b75eddc5629e839698b762f594be42b9f (diff) | |
download | opie-3bf4809c4f2263f0130472c41aa6c85e46e61db9.zip opie-3bf4809c4f2263f0130472c41aa6c85e46e61db9.tar.gz opie-3bf4809c4f2263f0130472c41aa6c85e46e61db9.tar.bz2 |
- implement nomax.patch from openembedded
-rw-r--r-- | library/qpeapplication.cpp | 6 | ||||
-rw-r--r-- | library/widget_showing.cpp | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 953f9d0..0f3e4a4 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -247,12 +247,13 @@ public: } } } static bool read_widget_rect(const QString &app, bool &maximized, QPoint &p, QSize &s) { +#ifndef OPIE_NO_WINDOWED maximized = TRUE; // 350 is the trigger in qwsdefaultdecoration for providing a resize button if ( qApp->desktop()->width() <= 350 ) return FALSE; Config cfg( "qpe" ); @@ -268,13 +269,13 @@ public: s.setHeight( l[3].toInt() ); maximized = l[4].toInt(); return TRUE; } - +#endif return FALSE; } static bool validate_widget_size(const QWidget *w, QPoint &p, QSize &s) { @@ -318,13 +319,13 @@ public: } static void store_widget_rect(QWidget *w, QString &app) { if( !w ) return; - +#ifndef OPIE_NO_WINDOWED // 350 is the trigger in qwsdefaultdecoration for providing a resize button if ( qApp->desktop()->width() <= 350 ) return; // we use these to map the offset of geometry and pos. ( we can only use normalGeometry to // get the non-maximized version, so we have to do it the hard way ) int offsetX = w->x() - w->geometry().left(); @@ -339,12 +340,13 @@ public: // Stores the window placement as pos(), size() (due to the offset mapping) Config cfg( "qpe" ); cfg.setGroup("ApplicationPositions"); QString s; s.sprintf("%d,%d,%d,%d,%d", r.left() + offsetX, r.top() + offsetY, r.width(), r.height(), w->isMaximized() ); cfg.writeEntry( app, s ); +#endif } static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) { /* // This works but disable it for now until it is safe to apply diff --git a/library/widget_showing.cpp b/library/widget_showing.cpp index 43ece64..43d19b0 100644 --- a/library/widget_showing.cpp +++ b/library/widget_showing.cpp @@ -49,14 +49,18 @@ int QPEApplication::execDialog( QDialog* d, bool nomax ) void QPEApplication::showWidget( QWidget* wg, bool nomax ) { if ( wg->isVisible() ) { wg->show(); return; } +#ifndef OPIE_NO_WINDOWED + if ( TRUE ) { +#else if ( !nomax && ( qApp->desktop()->width() <= 320 ) ){ +#endif wg->showMaximized(); } else { #ifdef Q_WS_QWS QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() ); #else QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() ); |