-rw-r--r-- | core/apps/calibrate/main.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/core/apps/calibrate/main.cpp b/core/apps/calibrate/main.cpp index d1ad083..1c295eb 100644 --- a/core/apps/calibrate/main.cpp +++ b/core/apps/calibrate/main.cpp | |||
@@ -25,2 +25,6 @@ | |||
25 | 25 | ||
26 | #ifdef QWS | ||
27 | #include <qwindowsystem_qws.h> | ||
28 | #endif | ||
29 | |||
26 | int main( int argc, char ** argv ) | 30 | int main( int argc, char ** argv ) |
@@ -30,13 +34,13 @@ int main( int argc, char ** argv ) | |||
30 | 34 | ||
31 | #if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) | 35 | #ifdef QWS |
32 | if ( !QFile::exists( "/etc/pointercal" ) ) { | 36 | if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { |
37 | #endif | ||
33 | // Make sure calibration widget starts on top. | 38 | // Make sure calibration widget starts on top. |
34 | Calibrate *cal = new Calibrate; | 39 | Calibrate cal; |
35 | a.setMainWidget(cal); | 40 | a.setMainWidget(&cal); |
36 | a.showMainWidget(cal); | 41 | a.showMainWidget(&cal); |
37 | retval = a.exec(); | 42 | return a.exec(); |
38 | delete cal; | 43 | #ifdef QWS |
39 | } | 44 | } |
40 | #endif | 45 | #endif |
41 | return retval; | ||
42 | } | 46 | } |