summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 0e469ae..28fb13a 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -52,4 +52,5 @@
#include <qmainwindow.h>
#include <qwidgetlist.h>
+#include <qpixmapcache.h>
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
@@ -100,5 +101,5 @@ public:
: presstimer( 0 ), presswidget( 0 ), rightpressed( false ), kbgrabbed( false ),
notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ),
- keep_running( true ), qpe_main_widget( 0 ), qcopQok( false )
+ keep_running( true ), qcopQok( false ), qpe_main_widget( 0 )
{}
@@ -114,6 +115,6 @@ public:
bool forceshow : 1;
bool nomaximize : 1;
- bool qcopQok : 1;
bool keep_running : 1;
+ bool qcopQok : 1;
@@ -215,4 +216,5 @@ public:
nomaximize = nomax;
qpe_main_widget = mw;
+ qcopQok = TRUE;
#ifndef QT_NO_COP
@@ -577,4 +579,6 @@ QPEApplication::QPEApplication( int & argc, char **argv, Type t )
: QApplication( hack(argc), argv, t ), pidChannel( 0 )
{
+ QPixmapCache::setCacheLimit(256); // sensible default for smaller devices.
+
d = new QPEApplicationData;
d->loadTextCodecs();
@@ -1777,4 +1781,7 @@ void QPEApplication::setStylusOperation( QWidget * w, StylusMode mode )
bool QPEApplication::eventFilter( QObject *o, QEvent *e )
{
+ if ( !o->isWidgetType() )
+ return FALSE;
+
if ( stylusDict && e->type() >= QEvent::MouseButtonPress && e->type() <= QEvent::MouseMove ) {
QMouseEvent * me = ( QMouseEvent* ) e;
@@ -1785,5 +1792,6 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
case QEvent::MouseButtonPress:
if ( me->button() == LeftButton ) {
- d->presstimer = startTimer(500); // #### pref.
+ if (!d->presstimer )
+ d->presstimer = startTimer(500); // #### pref.
d->presswidget = (QWidget*)o;
d->presspos = me->pos();
@@ -1905,4 +1913,6 @@ int QPEApplication::exec()
#ifndef QT_NO_COP
d->sendQCopQ();
+ if ( !d->keep_running )
+ processEvents(); // we may have received QCop messages in the meantime.
#endif