summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index ae1632e..5ce3011 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -297,25 +297,24 @@ static void qpe_show_dialog( QDialog* d, bool nomax )
297 d->move(p.x(),0); 297 d->move(p.x(),0);
298 } else { 298 } else {
299 d->resize(w, h); 299 d->resize(w, h);
300 } 300 }
301 301
302 d->show(); 302 d->show();
303 } 303 }
304} 304}
305 305
306 static bool read_widget_rect(const QString &app, bool &maximized, QPoint &p, QSize &s) 306 static bool read_widget_rect(const QString &app, bool &maximized, QPoint &p, QSize &s)
307 { 307 {
308 maximized = TRUE; 308 maximized = TRUE;
309 qDebug("read_widget_rect");
310 // 350 is the trigger in qwsdefaultdecoration for providing a resize button 309 // 350 is the trigger in qwsdefaultdecoration for providing a resize button
311 if ( qApp->desktop()->width() <= 350 ) 310 if ( qApp->desktop()->width() <= 350 )
312 return FALSE; 311 return FALSE;
313 312
314 Config cfg( "qpe" ); 313 Config cfg( "qpe" );
315 cfg.setGroup("ApplicationPositions"); 314 cfg.setGroup("ApplicationPositions");
316 QString str = cfg.readEntry( app, QString::null ); 315 QString str = cfg.readEntry( app, QString::null );
317 QStringList l = QStringList::split(",", str); 316 QStringList l = QStringList::split(",", str);
318 317
319 if ( l.count() == 5) { 318 if ( l.count() == 5) {
320 p.setX( l[0].toInt() ); 319 p.setX( l[0].toInt() );
321 p.setY( l[1].toInt() ); 320 p.setY( l[1].toInt() );
@@ -369,25 +368,24 @@ static void qpe_show_dialog( QDialog* d, bool nomax )
369 p.setX( maxX - wWidth ); 368 p.setX( maxX - wWidth );
370 if ( p.y() + wHeight > maxY ) 369 if ( p.y() + wHeight > maxY )
371 p.setY( maxY - wHeight ); 370 p.setY( maxY - wHeight );
372 371
373 return TRUE; 372 return TRUE;
374 } 373 }
375 374
376 static void store_widget_rect(QWidget *w, QString &app) 375 static void store_widget_rect(QWidget *w, QString &app)
377 { 376 {
378 // 350 is the trigger in qwsdefaultdecoration for providing a resize button 377 // 350 is the trigger in qwsdefaultdecoration for providing a resize button
379 if ( qApp->desktop()->width() <= 350 ) 378 if ( qApp->desktop()->width() <= 350 )
380 return; 379 return;
381 qDebug("store_widget_rect");
382 // we use these to map the offset of geometry and pos. ( we can only use normalGeometry to 380 // we use these to map the offset of geometry and pos. ( we can only use normalGeometry to
383 // get the non-maximized version, so we have to do it the hard way ) 381 // get the non-maximized version, so we have to do it the hard way )
384 int offsetX = w->x() - w->geometry().left(); 382 int offsetX = w->x() - w->geometry().left();
385 int offsetY = w->y() - w->geometry().top(); 383 int offsetY = w->y() - w->geometry().top();
386 384
387 QRect r; 385 QRect r;
388 if ( w->isMaximized() ) 386 if ( w->isMaximized() )
389 r = ( (HackWidget *) w)->normalGeometry(); 387 r = ( (HackWidget *) w)->normalGeometry();
390 else 388 else
391 r = w->geometry(); 389 r = w->geometry();
392 390
393 // Stores the window placement as pos(), size() (due to the offset mapping) 391 // Stores the window placement as pos(), size() (due to the offset mapping)