]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tooltips/ktooltip.cpp
Krazy knows about KSharedPtrs now so no need to exclude
[dolphin.git] / src / tooltips / ktooltip.cpp
index 1b18c10aa8b4d6af94175f090b5af7bcbd6bbf68..b0b044674ad10356d8f5efc538ff8794be5f627c 100644 (file)
@@ -18,6 +18,7 @@
  ***************************************************************************/
 
 #include "ktooltip.h"
+#include "ktooltip_p.h"
 
 #include <QApplication>
 #include <QMap>
@@ -35,9 +36,6 @@
 #  include <X11/extensions/shape.h>
 #endif
 
-#include "ktooltip_p.h"
-
-
 // compile with XShape older than 1.0
 #ifndef ShapeInput
 const int ShapeInput = 2;
@@ -197,7 +195,11 @@ QRegion KToolTipDelegate::shapeMask(const KStyleOptionToolTip *option) const
 
 bool KToolTipDelegate::haveAlphaChannel() const
 {
+#ifdef Q_WS_X11
     return QX11Info::isCompositingManagerRunning();
+#else
+       return false;
+#endif
 }
 
 
@@ -226,9 +228,11 @@ private:
 
 KTipLabel::KTipLabel() : QWidget(0, Qt::ToolTip)
 {
+#ifdef Q_WS_X11
     if (QX11Info::isCompositingManagerRunning()) {
         setAttribute(Qt::WA_TranslucentBackground);
     }
+#endif
 }
 
 void KTipLabel::showTip(const QPoint &pos, const KToolTipItem *item)
@@ -254,11 +258,13 @@ void KTipLabel::paintEvent(QPaintEvent*)
     KStyleOptionToolTip option = styleOption();
     option.rect = rect();
 
+#ifdef Q_WS_X11
     if (QX11Info::isCompositingManagerRunning())
         XShapeCombineRegion(x11Info().display(), winId(), ShapeInput, 0, 0,
                             delegate()->inputShape(&option).handle(), ShapeSet);
     else
-        setMask(delegate()->shapeMask(&option));
+#endif
+               setMask(delegate()->shapeMask(&option));
 
     QPainter p(this);
     p.setFont(option.font);