From 77b49e1a8a412ab8f5752fffc6c75614637b52a6 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Fri, 3 Aug 2012 13:00:02 +0200 Subject: [PATCH] Use #if HAVE_X11 instead of #ifdef HAVE_X11 as advised by David --- private/windowshadows.cpp | 12 ++++++------ theme.cpp | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/private/windowshadows.cpp b/private/windowshadows.cpp index 911f6bcd6..10964f312 100644 --- a/private/windowshadows.cpp +++ b/private/windowshadows.cpp @@ -21,7 +21,7 @@ #include #include -#ifdef HAVE_X11 +#if HAVE_X11 #include #include #include @@ -125,7 +125,7 @@ void WindowShadows::Private::updateShadows() void WindowShadows::Private::initPixmap(const QString &element) { -#ifdef HAVE_X11 +#if HAVE_X11 QPixmap pix = q->pixmap(element); if (pix.handle() == 0) { Pixmap xPix = XCreatePixmap(QX11Info::display(), QX11Info::appRootWindow(), pix.width(), pix.height(), 32); @@ -153,7 +153,7 @@ void WindowShadows::Private::setupPixmaps() initPixmap("shadow-left"); initPixmap("shadow-topleft"); -#ifdef HAVE_X11 +#if HAVE_X11 foreach (const QPixmap &pixmap, m_shadowPixmaps) { m_data << pixmap.handle(); } @@ -190,7 +190,7 @@ void WindowShadows::Private::setupPixmaps() void WindowShadows::Private::clearPixmaps() { -#ifdef HAVE_X11 +#if HAVE_X11 if (m_managePixmaps) { foreach (const QPixmap &pixmap, m_shadowPixmaps) { XFreePixmap(QX11Info::display(), pixmap.handle()); @@ -204,7 +204,7 @@ void WindowShadows::Private::clearPixmaps() void WindowShadows::Private::updateShadow(const QWidget *window) { -#ifdef HAVE_X11 +#if HAVE_X11 if (m_data.isEmpty()) { setupPixmaps(); } @@ -220,7 +220,7 @@ void WindowShadows::Private::updateShadow(const QWidget *window) void WindowShadows::Private::clearShadow(const QWidget *window) { -#ifdef HAVE_X11 +#if HAVE_X11 Display *dpy = QX11Info::display(); Atom atom = XInternAtom(dpy, "_KDE_NET_WM_SHADOW", False); XDeleteProperty(dpy, window->winId(), atom); diff --git a/theme.cpp b/theme.cpp index 679b8a345..7030e8c05 100644 --- a/theme.cpp +++ b/theme.cpp @@ -29,7 +29,7 @@ #include "config.h" -#ifdef HAVE_X11 +#if HAVE_X11 #include #include "private/effectwatcher_p.h" #endif @@ -113,7 +113,7 @@ public: if (QPixmap::defaultDepth() > 8) { QObject::connect(KWindowSystem::self(), SIGNAL(compositingChanged(bool)), q, SLOT(compositingChanged(bool))); -#ifdef HAVE_X11 +#if HAVE_X11 //watch for blur effect property changes as well if (!s_blurEffectWatcher) { s_blurEffectWatcher = new EffectWatcher("_KDE_NET_WM_BLUR_BEHIND_REGION"); @@ -170,7 +170,7 @@ public: static const char *defaultTheme; static const char *systemColorsTheme; static const char *themeRcFile; -#ifdef HAVE_X11 +#if HAVE_X11 static EffectWatcher *s_blurEffectWatcher; #endif @@ -215,7 +215,7 @@ const char *ThemePrivate::themeRcFile = "plasmarc"; // the system colors theme is used to cache unthemed svgs with colorization needs // these svgs do not follow the theme's colors, but rather the system colors const char *ThemePrivate::systemColorsTheme = "internal-system-colors"; -#ifdef HAVE_X11 +#if HAVE_X11 EffectWatcher *ThemePrivate::s_blurEffectWatcher = 0; #endif @@ -282,7 +282,7 @@ QString ThemePrivate::findInTheme(const QString &image, const QString &theme, bo void ThemePrivate::compositingChanged(bool active) { -#ifdef HAVE_X11 +#if HAVE_X11 if (compositingActive != active) { compositingActive = active; //kDebug() << QTime::currentTime();