summaryrefslogtreecommitdiff
path: root/x11
Side-by-side diff
Diffstat (limited to 'x11') (more/less context) (ignore whitespace changes)
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.cpp26
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.h9
-rw-r--r--x11/libqpe-x11/qt/qwindowsystem_qws.h19
3 files changed, 53 insertions, 1 deletions
diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp
index 6e4a96c..8785c74 100644
--- a/x11/libqpe-x11/qpe/qpeapplication.cpp
+++ b/x11/libqpe-x11/qpe/qpeapplication.cpp
@@ -634,2 +634,28 @@ void QPEApplication::hideOrQuit() {
+/*!
+ \internal
+*/
+void QPEApplication::prepareForTermination( bool willrestart )
+{
+ if ( willrestart ) {
+ // Draw a big wait icon, the image can be altered in later revisions
+ // QWidget *d = QApplication::desktop();
+ QImage img = Resource::loadImage( "launcher/new_wait" );
+ QPixmap pix;
+ pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) );
+ QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize |
+ QWidget::WStyle_NoBorder | QWidget::WStyle_Tool );
+ lblWait->setPixmap( pix );
+ lblWait->setAlignment( QWidget::AlignCenter );
+ lblWait->show();
+ lblWait->showMaximized();
+ }
+#ifndef SINGLE_APP
+ { QCopEnvelope envelope( "QPE/System", "forceQuit()" );
+ }
+ processEvents(); // ensure the message goes out.
+ sleep( 1 ); // You have 1 second to comply.
+#endif
+}
+
#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
diff --git a/x11/libqpe-x11/qpe/qpeapplication.h b/x11/libqpe-x11/qpe/qpeapplication.h
index 2af1c66..333f331 100644
--- a/x11/libqpe-x11/qpe/qpeapplication.h
+++ b/x11/libqpe-x11/qpe/qpeapplication.h
@@ -56,2 +56,10 @@ public:
+// QWS bits
+ enum screenSaverHint {
+ Disable = 0,
+ DisableLightOff = 1,
+ DisableSuspend = 2,
+ Enable = 100
+ };
+
signals:
@@ -80,2 +88,3 @@ protected:
virtual void shutdown();
+ void prepareForTermination(bool willrestart);
bool eventFilter( QObject*, QEvent* );
diff --git a/x11/libqpe-x11/qt/qwindowsystem_qws.h b/x11/libqpe-x11/qt/qwindowsystem_qws.h
index 7bc43c5..2652f5f 100644
--- a/x11/libqpe-x11/qt/qwindowsystem_qws.h
+++ b/x11/libqpe-x11/qt/qwindowsystem_qws.h
@@ -3,2 +3,3 @@
+class QWSScreenSaver;
class QWSServer {
@@ -13,5 +14,21 @@ QWSServer(){}
}
+ static void setScreenSaver( QWSScreenSaver* ) {
-};
+ }
+ static void setScreenSaverInterval( int ) {
+
+ }
+ static void setScreenSaverIntervals( int[] ) {
+
+ }
+ static void screenSaverActivate( bool ) {
+ }
+ static void setDesktopBackground( const QImage& ) {
+
+ }
+
+};
+struct QWSScreenSaver {
+};