win32 compile fix

svn path=/trunk/KDE/kdebase/apps/; revision=941223
This commit is contained in:
Ralf Habacker 2009-03-19 07:19:10 +00:00
parent d4f8439d91
commit 9a810d4df0

View file

@ -197,7 +197,11 @@ QRegion KToolTipDelegate::shapeMask(const KStyleOptionToolTip *option) const
bool KToolTipDelegate::haveAlphaChannel() const bool KToolTipDelegate::haveAlphaChannel() const
{ {
#ifdef Q_WS_X11
return QX11Info::isCompositingManagerRunning(); return QX11Info::isCompositingManagerRunning();
#else
return false;
#endif
} }
@ -226,9 +230,11 @@ private:
KTipLabel::KTipLabel() : QWidget(0, Qt::ToolTip) KTipLabel::KTipLabel() : QWidget(0, Qt::ToolTip)
{ {
#ifdef Q_WS_X11
if (QX11Info::isCompositingManagerRunning()) { if (QX11Info::isCompositingManagerRunning()) {
setAttribute(Qt::WA_TranslucentBackground); setAttribute(Qt::WA_TranslucentBackground);
} }
#endif
} }
void KTipLabel::showTip(const QPoint &pos, const KToolTipItem *item) void KTipLabel::showTip(const QPoint &pos, const KToolTipItem *item)
@ -254,11 +260,13 @@ void KTipLabel::paintEvent(QPaintEvent*)
KStyleOptionToolTip option = styleOption(); KStyleOptionToolTip option = styleOption();
option.rect = rect(); option.rect = rect();
#ifdef Q_WS_X11
if (QX11Info::isCompositingManagerRunning()) if (QX11Info::isCompositingManagerRunning())
XShapeCombineRegion(x11Info().display(), winId(), ShapeInput, 0, 0, XShapeCombineRegion(x11Info().display(), winId(), ShapeInput, 0, 0,
delegate()->inputShape(&option).handle(), ShapeSet); delegate()->inputShape(&option).handle(), ShapeSet);
else else
setMask(delegate()->shapeMask(&option)); #endif
setMask(delegate()->shapeMask(&option));
QPainter p(this); QPainter p(this);
p.setFont(option.font); p.setFont(option.font);