From 77ef7e616d262db8f346150ce8ad54a09dfab259 Mon Sep 17 00:00:00 2001 From: Daniel Richard G Date: Mon, 11 Jun 2012 16:48:13 -0400 Subject: Enable building with older SHAPE extension, or -no-xshape (QTBUG-24653, QTBUG-25281) Change-Id: Idbd6671fdd665b9368709832f99bc42d2d9a1f84 Reviewed-by: Milla Pohjanheimo Reviewed-by: Albert Astals Cid Reviewed-by: Daniel Richard G. Reviewed-by: Andrew Stanley-Jones --- src/gui/kernel/qdnd_x11.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp index e3d5391..f87449c 100644 --- a/src/gui/kernel/qdnd_x11.cpp +++ b/src/gui/kernel/qdnd_x11.cpp @@ -1422,6 +1422,7 @@ void QDragManager::cancel(bool deleteSource) global_accepted_action = Qt::IgnoreAction; } +#ifndef QT_NO_SHAPE static bool windowInteractsWithPosition(const QPoint & pos, Window w, int shapeType) { @@ -1435,6 +1436,7 @@ bool windowInteractsWithPosition(const QPoint & pos, Window w, int shapeType) } return interacts; } +#endif static Window findRealWindow(const QPoint & pos, Window w, int md, bool ignoreNonXdndAwareWindows) @@ -1462,6 +1464,9 @@ Window findRealWindow(const QPoint & pos, Window w, int md, bool ignoreNonXdndAw AnyPropertyType, &type, &f,&n,&a,&data); if (data) XFree(data); if (type) { +#ifdef QT_NO_SHAPE + return w; +#else // !QT_NO_SHAPE const QPoint relPos = pos - QPoint(attr.x,attr.y); // When ShapeInput and ShapeBounding are not set they return a single rectangle with the geometry of the window, this is why we // need an && here so that in the case one is set and the other is not we still get the correct result. @@ -1474,6 +1479,7 @@ Window findRealWindow(const QPoint & pos, Window w, int md, bool ignoreNonXdndAw #endif if (windowContainsMouse) return w; +#endif // QT_NO_SHAPE } } -- cgit v0.12