summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.cpp
authorzecke <zecke>2002-10-17 16:45:38 (UTC)
committer zecke <zecke>2002-10-17 16:45:38 (UTC)
commit0655456f68849bfad9019a7760dec961792d7519 (patch) (side-by-side diff)
tree4651cad54a144385442a26e78f4a83b57501830f /core/launcher/desktop.cpp
parent8511273d7122d50ffea27f78ba13ab72af60326d (diff)
downloadopie-0655456f68849bfad9019a7760dec961792d7519.zip
opie-0655456f68849bfad9019a7760dec961792d7519.tar.gz
opie-0655456f68849bfad9019a7760dec961792d7519.tar.bz2
Move around some #ifdefs to be able to be built with Qt2/X11
Diffstat (limited to 'core/launcher/desktop.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index d74b745..1fd3f6a 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -149,13 +149,12 @@ void DesktopPowerAlerter::hideEvent( QHideEvent *e )
{
QMessageBox::hideEvent( e );
alertCount = 0;
currentPriority = INT_MAX;
}
-
class QPEScreenSaver : public QWSScreenSaver
{
private:
int LcdOn;
public:
@@ -322,13 +321,12 @@ private:
bool m_lcd_status;
int m_backlight_bright;
bool m_backlight_forcedoff;
};
-
void DesktopApplication::switchLCD ( bool on )
{
if ( qApp ) {
DesktopApplication *dapp = (DesktopApplication *) qApp;
if ( dapp-> m_screensaver ) {
@@ -639,13 +637,13 @@ Desktop::Desktop() :
rereadVolumes();
packageSlave = new PackageSlave( this );
connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) );
qApp->installEventFilter( this );
-
+
qApp-> setMainWidget ( launcher );
}
void Desktop::show()
{
login( TRUE );
@@ -706,29 +704,33 @@ void Desktop::checkMemory()
existingMessage = FALSE;
#endif
}
static bool isVisibleWindow( int wid )
{
+#ifdef QWS
const QList<QWSWindow> &list = qwsServer->clientWindows();
QWSWindow* w;
for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) {
if ( w->winId() == wid )
return !w->isFullyObscured();
}
+#endif
return FALSE;
}
static bool hasVisibleWindow( const QString& clientname )
{
+#ifdef QWS
const QList<QWSWindow> &list = qwsServer->clientWindows();
QWSWindow* w;
for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) {
if ( w->client() ->identity() == clientname && !w->isFullyObscured() )
return TRUE;
}
+#endif
return FALSE;
}
void Desktop::raiseLauncher()
{
Config cfg( "qpe" ); //F12 'Home'
@@ -742,13 +744,13 @@ void Desktop::raiseLauncher()
QCopEnvelope e( "QPE/System", "execute(QString)" );
e << tempItem;
}
}
void Desktop::home ( )
-{
+{
if ( isVisibleWindow( launcher->winId() ) )
launcher->nextView();
else
launcher->raise();
}