summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Richard G <danielg@teragram.com>2012-06-11 20:48:13 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-06-22 11:15:45 (GMT)
commit77ef7e616d262db8f346150ce8ad54a09dfab259 (patch)
tree56f7d33951e97932187f19b35d848c496ad13a23
parent1f9168d3839b2081572368b786c263a04955337c (diff)
downloadQt-77ef7e616d262db8f346150ce8ad54a09dfab259.zip
Qt-77ef7e616d262db8f346150ce8ad54a09dfab259.tar.gz
Qt-77ef7e616d262db8f346150ce8ad54a09dfab259.tar.bz2
Enable building with older SHAPE extension, or -no-xshape (QTBUG-24653, QTBUG-25281)
Change-Id: Idbd6671fdd665b9368709832f99bc42d2d9a1f84 Reviewed-by: Milla Pohjanheimo <milla.pohjanheimo@digia.com> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Daniel Richard G. <skunk@iSKUNK.ORG> Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
-rw-r--r--src/gui/kernel/qdnd_x11.cpp6
1 files changed, 6 insertions, 0 deletions
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
}
}