summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp16
-rw-r--r--library/qpeapplication.h2
-rw-r--r--library/widget_showing.cpp9
3 files changed, 15 insertions, 12 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index dcc1001..34f5e6a 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -102,4 +102,5 @@
102 102
103static bool useBigPixmaps = 0; 103static bool useBigPixmaps = 0;
104static bool saveWindowsPos = 0;
104 105
105class HackWidget : public QWidget 106class HackWidget : public QWidget
@@ -130,4 +131,5 @@ public:
130 smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 ); 131 smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 );
131 bigIconSize = cfg.readNumEntry( "BigIconSize", 32 ); 132 bigIconSize = cfg.readNumEntry( "BigIconSize", 32 );
133 saveWindowsPos = cfg.readBoolEntry( "AllowWindowed", false );
132#ifdef OPIE_WITHROHFEEDBACK 134#ifdef OPIE_WITHROHFEEDBACK
133 RoH = 0; 135 RoH = 0;
@@ -251,5 +253,6 @@ public:
251 static bool read_widget_rect(const QString &app, bool &maximized, QPoint &p, QSize &s) 253 static bool read_widget_rect(const QString &app, bool &maximized, QPoint &p, QSize &s)
252 { 254 {
253#ifndef OPIE_NO_WINDOWED 255 if (!saveWindowsPos)
256 return FALSE;
254 maximized = TRUE; 257 maximized = TRUE;
255 // 350 is the trigger in qwsdefaultdecoration for providing a resize button 258 // 350 is the trigger in qwsdefaultdecoration for providing a resize button
@@ -273,6 +276,4 @@ public:
273 return TRUE; 276 return TRUE;
274 } 277 }
275#endif
276 return FALSE;
277 } 278 }
278 279
@@ -323,5 +324,6 @@ public:
323 if( !w ) 324 if( !w )
324 return; 325 return;
325#ifndef OPIE_NO_WINDOWED 326 if (!saveWindowsPos)
327 return;
326 // 350 is the trigger in qwsdefaultdecoration for providing a resize button 328 // 350 is the trigger in qwsdefaultdecoration for providing a resize button
327 if ( qApp->desktop()->width() <= 350 ) 329 if ( qApp->desktop()->width() <= 350 )
@@ -344,5 +346,4 @@ public:
344 s.sprintf("%d,%d,%d,%d,%d", r.left() + offsetX, r.top() + offsetY, r.width(), r.height(), w->isMaximized() ); 346 s.sprintf("%d,%d,%d,%d,%d", r.left() + offsetX, r.top() + offsetY, r.width(), r.height(), w->isMaximized() );
345 cfg.writeEntry( app, s ); 347 cfg.writeEntry( app, s );
346#endif
347 } 348 }
348 349
@@ -2208,4 +2209,9 @@ void QPEApplication::hideOrQuit()
2208} 2209}
2209 2210
2211bool QPEApplication::isSaveWindowsPos()
2212{
2213 return saveWindowsPos;
2214}
2215
2210#if (__GNUC__ > 2 ) && !defined(_OS_MACX_) 2216#if (__GNUC__ > 2 ) && !defined(_OS_MACX_)
2211extern "C" void __cxa_pure_virtual(); 2217extern "C" void __cxa_pure_virtual();
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 6486cad..7c99a9a 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -138,4 +138,6 @@ public:
138 int exec(); 138 int exec();
139 139
140 static bool isSaveWindowsPos();
141
140signals: 142signals:
141 void clientMoused(); 143 void clientMoused();
diff --git a/library/widget_showing.cpp b/library/widget_showing.cpp
index e43a16a..cc1bfb2 100644
--- a/library/widget_showing.cpp
+++ b/library/widget_showing.cpp
@@ -53,11 +53,6 @@ void QPEApplication::showWidget( QWidget* wg, bool nomax ) {
53 } 53 }
54 54
55#ifdef OPIE_NO_WINDOWED 55 if ( !isSaveWindowsPos() || (!nomax
56 Q_UNUSED( nomax ) 56 && ( qApp->desktop()->width() <= 30 )) ){
57 if ( TRUE ) {
58#else
59 if ( !nomax
60 && ( qApp->desktop()->width() <= 320 ) ){
61#endif
62 wg->showMaximized(); 57 wg->showMaximized();
63 } else { 58 } else {