diff --git a/composite.cpp b/composite.cpp index 1c4b530cac..f594d1b2c7 100644 --- a/composite.cpp +++ b/composite.cpp @@ -69,9 +69,6 @@ along with this program. If not, see . #ifdef HAVE_XCOMPOSITE #include -#if XCOMPOSITE_MAJOR > 0 || XCOMPOSITE_MINOR >= 3 -#define HAVE_XCOMPOSITE_OVERLAY -#endif #endif #ifdef HAVE_XRANDR #include diff --git a/overlaywindow.cpp b/overlaywindow.cpp index 89fa65c74e..65db6dc591 100644 --- a/overlaywindow.cpp +++ b/overlaywindow.cpp @@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ +#include + #include "overlaywindow.h" #include "kwinglobals.h" @@ -28,6 +30,13 @@ along with this program. If not, see . #include +#ifdef HAVE_XCOMPOSITE +#include +#if XCOMPOSITE_MAJOR > 0 || XCOMPOSITE_MINOR >= 3 +#define HAVE_XCOMPOSITE_OVERLAY +#endif +#endif + namespace KWin { OverlayWindow::OverlayWindow() : m_window(None) @@ -48,10 +57,10 @@ bool OverlayWindow::create() if (!Extensions::shapeInputAvailable()) // needed in setupOverlay() return false; #ifdef HAVE_XCOMPOSITE_OVERLAY - m_overlay = XCompositeGetOverlayWindow(display(), rootWindow()); - if (m_overlay == None) + m_window = XCompositeGetOverlayWindow(display(), rootWindow()); + if (m_window == None) return false; - XResizeWindow(display(), m_overlay, displayWidth(), displayHeight()); + XResizeWindow(display(), m_window, displayWidth(), displayHeight()); return true; #else return false; @@ -132,7 +141,7 @@ void OverlayWindow::destroy() XShapeCombineRectangles(display(), m_window, ShapeBounding, 0, 0, &rec, 1, ShapeSet, Unsorted); XShapeCombineRectangles(display(), m_window, ShapeInput, 0, 0, &rec, 1, ShapeSet, Unsorted); #ifdef HAVE_XCOMPOSITE_OVERLAY - XCompositeReleaseOverlayWindow(display(), m_overlay); + XCompositeReleaseOverlayWindow(display(), m_window); #endif m_window = None; m_shown = false;