[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenetwork/kopete/libkopete
From:       Benjamin Meyer <benjamin () csh ! rit ! edu>
Date:       2004-01-11 3:19:22
Message-ID: 20040111031922.DAA818FED () office ! kde ! org
[Download RAW message or body]

CVS commit by bmeyer: 

Well I am glad I got home before midnight to make this commit!
Some ifdefs to get the code to compile without x11
Approved by: Olivier Goffart <ogoffart@tiscalinet.be>


  M +14 -5     kopeteaway.cpp   1.34


--- kdenetwork/kopete/libkopete/kopeteaway.cpp  #1.33:1.34
@@ -35,4 +35,5 @@
 #include <ksettings/dispatcher.h>
 
+#ifdef Q_WS_X11
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
@@ -45,4 +46,5 @@
 #include <X11/extensions/scrnsaver.h>
 #endif
+#endif // Q_WS_X11
 
 // As this is an untested X extension we better leave it off
@@ -67,8 +69,10 @@ struct KopeteAwayPrivate
         int mouse_y;
         unsigned int mouse_mask;
+#ifdef Q_WS_X11
         Window    root;               /* root window the pointer is on */
         Screen*   screen;             /* screen the pointer is on      */
 
         Time xIdleTime;
+#endif
         bool useXidle;
         bool useMit;
@@ -94,10 +98,13 @@ KopeteAway::KopeteAway() : QObject( kapp
 
         // set the XAutoLock info
+#ifdef Q_WS_X11
         Display *dsp = qt_xdisplay();
+#endif
         d->mouse_x = d->mouse_y=0;
         d->mouse_mask = 0;
+#ifdef Q_WS_X11
         d->root = DefaultRootWindow (dsp);
         d->screen = ScreenOfDisplay (dsp, DefaultScreen (dsp));
-
+#endif
         d->useXidle = false;
         d->useMit = false;
@@ -109,6 +116,7 @@ KopeteAway::KopeteAway() : QObject( kapp
                 d->useMit = XScreenSaverQueryExtension(qt_xdisplay(), &dummy, &dummy);
 #endif
+#ifdef Q_WS_X11
         d->xIdleTime = 0;
-
+#endif
         if (d->useXidle)
                 kdDebug(14010) << "using X11 Xidle extension" << endl;
@@ -344,4 +352,5 @@ void KopeteAway::slotTimerTimeout()
         // In fact as of KDE 2.0 this code is practically unrecognisable as xautolock.
 
+#ifdef Q_WS_X11
         Display *dsp = qt_xdisplay();
         Window           dummy_w;
@@ -377,7 +386,7 @@ void KopeteAway::slotTimerTimeout()
                 }
         }
-
+#endif
         // =================================================================================
-
+#ifdef Q_WS_X11
         Time xIdleTime = 0; // millisecs since last input event
 
@@ -413,5 +422,5 @@ void KopeteAway::slotTimerTimeout()
                 d->xIdleTime = xIdleTime;
         }
-
+#endif // Q_WS_X11
         // =================================================================================
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic