[Digikam-devel] extragear/libs/kipi-plugins/slideshow

Gustavo P. Boiko gustavo.boiko at kdemail.net
Thu Nov 29 13:20:12 GMT 2007


SVN commit 742966 by boiko:

Only use XRandR when under X11
CCMAIL: digikam-devel at kde.org


 M  +12 -5     screenproperties.cpp  


--- trunk/extragear/libs/kipi-plugins/slideshow/screenproperties.cpp #742965:742966
@@ -28,13 +28,16 @@
 #include <QDataStream>
 #include <QApplication>
 #include <QDesktopWidget>
-#include <QX11Info>
 
-// X11 includes.
+#ifdef Q_WS_X11
+  #include <QX11Info>
 
-#include <X11/Xlib.h>
-#include <X11/extensions/Xrandr.h>
+  // X11 includes.
 
+  #include <X11/Xlib.h>
+  #include <X11/extensions/Xrandr.h>
+#endif
+
 // Local includes.
 
 #include "screenproperties.h"
@@ -49,6 +52,10 @@
     
 unsigned ScreenProperties::suggestFrameRate() 
 {
+// use XRandR only in X11
+#ifndef Q_WS_X11
+    return 25;
+#else
     int eventBase, errorBase;
     if ( !XRRQueryExtension(QX11Info::display(), &eventBase, &errorBase)) {
         // No information, make a lucky guess on based on that ;)
@@ -90,9 +97,9 @@
             bestRate      = r;
         }
     } while (++i < 3);
-
     //qDebug("using %d Hz as framerate for effects", bestRate);
     return bestRate;
+#endif // Q_WS_X11
 }
 
 bool ScreenProperties::enableVSync() 



More information about the Digikam-devel mailing list