summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 2bd7cbe..953f9d0 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -158,25 +158,25 @@ public:
158 QString appName; 158 QString appName;
159 struct QCopRec 159 struct QCopRec
160 { 160 {
161 QCopRec( const QCString &ch, const QCString &msg, 161 QCopRec( const QCString &ch, const QCString &msg,
162 const QByteArray &d ) : 162 const QByteArray &d ) :
163 channel( ch ), message( msg ), data( d ) 163 channel( ch ), message( msg ), data( d )
164 { } 164 { }
165 165
166 QCString channel; 166 QCString channel;
167 QCString message; 167 QCString message;
168 QByteArray data; 168 QByteArray data;
169 }; 169 };
170 QWidget* qpe_main_widget; 170 QGuardedPtr<QWidget> qpe_main_widget;
171 QGuardedPtr<QWidget> lastraised; 171 QGuardedPtr<QWidget> lastraised;
172 QQueue<QCopRec> qcopq; 172 QQueue<QCopRec> qcopq;
173 QString styleName; 173 QString styleName;
174 QString decorationName; 174 QString decorationName;
175 175
176 void enqueueQCop( const QCString &ch, const QCString &msg, 176 void enqueueQCop( const QCString &ch, const QCString &msg,
177 const QByteArray &data ) 177 const QByteArray &data )
178 { 178 {
179 qcopq.enqueue( new QCopRec( ch, msg, data ) ); 179 qcopq.enqueue( new QCopRec( ch, msg, data ) );
180 } 180 }
181 void sendQCopQ() 181 void sendQCopQ()
182 { 182 {
@@ -310,24 +310,27 @@ public:
310 p.setY(0); 310 p.setY(0);
311 311
312 if ( p.x() + wWidth > maxX ) 312 if ( p.x() + wWidth > maxX )
313 p.setX( maxX - wWidth ); 313 p.setX( maxX - wWidth );
314 if ( p.y() + wHeight > maxY ) 314 if ( p.y() + wHeight > maxY )
315 p.setY( maxY - wHeight ); 315 p.setY( maxY - wHeight );
316 316
317 return TRUE; 317 return TRUE;
318 } 318 }
319 319
320 static void store_widget_rect(QWidget *w, QString &app) 320 static void store_widget_rect(QWidget *w, QString &app)
321 { 321 {
322 if( !w )
323 return;
324
322 // 350 is the trigger in qwsdefaultdecoration for providing a resize button 325 // 350 is the trigger in qwsdefaultdecoration for providing a resize button
323 if ( qApp->desktop()->width() <= 350 ) 326 if ( qApp->desktop()->width() <= 350 )
324 return; 327 return;
325 // we use these to map the offset of geometry and pos. ( we can only use normalGeometry to 328 // we use these to map the offset of geometry and pos. ( we can only use normalGeometry to
326 // get the non-maximized version, so we have to do it the hard way ) 329 // get the non-maximized version, so we have to do it the hard way )
327 int offsetX = w->x() - w->geometry().left(); 330 int offsetX = w->x() - w->geometry().left();
328 int offsetY = w->y() - w->geometry().top(); 331 int offsetY = w->y() - w->geometry().top();
329 332
330 QRect r; 333 QRect r;
331 if ( w->isMaximized() ) 334 if ( w->isMaximized() )
332 r = ( (HackWidget *) w)->normalGeometry(); 335 r = ( (HackWidget *) w)->normalGeometry();
333 else 336 else