diff options
author | Albert Astals Cid <aacid@kde.org> | 2012-02-02 16:44:38 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-03 14:25:17 (GMT) |
commit | 21713e04160ee285c831fedd1f3c7b8ce0aba681 (patch) | |
tree | 476e719f27ab0023b03df879af4330539bb38f07 /src/gui/kernel/qt_x11_p.h | |
parent | f5ddeeca80983ad7579e0b7ba116f0250debdfcd (diff) | |
download | Qt-21713e04160ee285c831fedd1f3c7b8ce0aba681.zip Qt-21713e04160ee285c831fedd1f3c7b8ce0aba681.tar.gz Qt-21713e04160ee285c831fedd1f3c7b8ce0aba681.tar.bz2 |
Take into account shaping in findRealWindow
It can happen that there is a window covering all the screen but it is shaped
to only take part of the screen. If that happens, besides the condition of
QRect(attr.x,attr.y,attr.width,attr.height).contains(pos)
we also need to query the server for its region rectangles and make
sure the cursor is inside one of those rectangles. If that does not happen
we have to return 0 so the hierarchical XQueryTree search continues
Change-Id: Icb2204a50197e4a5e02e75601c67287525b290b0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/gui/kernel/qt_x11_p.h')
-rw-r--r-- | src/gui/kernel/qt_x11_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h index ed7c146..579a2b3 100644 --- a/src/gui/kernel/qt_x11_p.h +++ b/src/gui/kernel/qt_x11_p.h @@ -209,6 +209,9 @@ typedef Bool (*PtrXFixesQueryExtension)(Display *, int *, int *); typedef Status (*PtrXFixesQueryVersion)(Display *, int *, int *); typedef void (*PtrXFixesSetCursorName)(Display *dpy, Cursor cursor, const char *name); typedef void (*PtrXFixesSelectSelectionInput)(Display *dpy, Window win, Atom selection, unsigned long eventMask); +typedef void (*PtrXFixesDestroyRegion)(Display *dpy, /*XserverRegion*/ XID region); +typedef /*XserverRegion*/ XID (*PtrXFixesCreateRegionFromWindow)(Display *dpy, Window window, int kind); +typedef XRectangle *(*PtrXFixesFetchRegion)(Display *dpy, /*XserverRegion*/ XID region, int *nrectanglesRet); #endif // QT_NO_XFIXES #ifndef QT_NO_XCURSOR @@ -419,6 +422,9 @@ struct QX11Data PtrXFixesQueryVersion ptrXFixesQueryVersion; PtrXFixesSetCursorName ptrXFixesSetCursorName; PtrXFixesSelectSelectionInput ptrXFixesSelectSelectionInput; + PtrXFixesDestroyRegion ptrXFixesDestroyRegion; + PtrXFixesCreateRegionFromWindow ptrXFixesCreateRegionFromWindow; + PtrXFixesFetchRegion ptrXFixesFetchRegion; #endif #ifndef QT_NO_XINPUT |