]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blob - qt/patches/qt-4.8.1-fix-no-xshape-broken-build.patch
qt: Update to version 4.8.1.
[people/pmueller/ipfire-3.x.git] / qt / patches / qt-4.8.1-fix-no-xshape-broken-build.patch
1 diff -Nur a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp
2 --- a/src/gui/kernel/qdnd_x11.cpp 2012-03-14 15:01:16.000000000 +0100
3 +++ b/src/gui/kernel/qdnd_x11.cpp 2012-05-20 17:19:38.992247206 +0200
4 @@ -1422,6 +1422,7 @@
5 global_accepted_action = Qt::IgnoreAction;
6 }
7
8 +#ifndef QT_NO_SHAPE
9 static
10 bool windowInteractsWithPosition(const QPoint & pos, Window w, int shapeType)
11 {
12 @@ -1436,6 +1437,7 @@
13 }
14 return interacts;
15 }
16 +#endif
17
18 static
19 Window findRealWindow(const QPoint & pos, Window w, int md)
20 @@ -1462,6 +1464,8 @@
21 XGetWindowProperty(X11->display, w, ATOM(XdndAware), 0, 0, False,
22 AnyPropertyType, &type, &f,&n,&a,&data);
23 if (data) XFree(data);
24 +
25 +#ifndef QT_NO_SHAPE
26 if (type) {
27 // When ShapeInput and ShapeBounding are not set they return a single rectangle with the geometry of the window, this is why we
28 // need an && here so that in the case one is set and the other is not we still get the correct result.
29 @@ -1469,6 +1473,9 @@
30 if (windowContainsMouse)
31 return w;
32 }
33 +#else
34 + return w;
35 +#endif
36 }
37
38 Window r, p;
39 @@ -1488,10 +1495,12 @@
40 // innermost window.
41 }
42
43 +#ifndef QT_NO_SHAPE
44 // No children!
45 if (!windowContainsMouse)
46 return 0;
47 else
48 +#endif
49 return w;
50 }
51 }