summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qwindowsxpstyle.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-31 02:08:46 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-31 02:08:46 (GMT)
commitc0baaf9b1ba5ba5089e230253c2b711cb7d43735 (patch)
tree4a0d6968fc5137ad31f37620c2eb9de087bf0843 /src/gui/styles/qwindowsxpstyle.cpp
parentaf8689cb4f2975ec7f8658a709195d9be4aff33f (diff)
parent1835decbcfe6c95de3c895cb5bf2d0cefe4d2643 (diff)
downloadQt-c0baaf9b1ba5ba5089e230253c2b711cb7d43735.zip
Qt-c0baaf9b1ba5ba5089e230253c2b711cb7d43735.tar.gz
Qt-c0baaf9b1ba5ba5089e230253c2b711cb7d43735.tar.bz2
Merge branch 'master' of ../../qt into kinetic-declarativeui
Conflicts: src/corelib/kernel/kernel.pri src/corelib/kernel/qabstractitemmodel.cpp src/corelib/kernel/qmetaobject.cpp src/corelib/kernel/qmetaobject.h
Diffstat (limited to 'src/gui/styles/qwindowsxpstyle.cpp')
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index 9560c4b..ad87354 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -134,6 +134,7 @@ static const int windowsRightBorder = 12; // right border on windows
// External function calls
extern Q_GUI_EXPORT HDC qt_win_display_dc();
+extern QRegion qt_region_from_HRGN(HRGN rgn);
@@ -445,6 +446,7 @@ bool QWindowsXPStylePrivate::isTransparent(XPThemeData &themeData)
themeData.stateId);
}
+
/*! \internal
Returns a QRegion of the region of the part
*/
@@ -456,12 +458,18 @@ QRegion QWindowsXPStylePrivate::region(XPThemeData &themeData)
themeData.stateId, &rect, &hRgn)))
return QRegion();
- QRegion rgn = QRegion(0,0,1,1);
- const bool success = CombineRgn(rgn.handle(), hRgn, 0, RGN_COPY) != ERROR;
- DeleteObject(hRgn);
+ HRGN dest = CreateRectRgn(0, 0, 0, 0);
+ const bool success = CombineRgn(dest, hRgn, 0, RGN_COPY) != ERROR;
+
+ QRegion region;
+
if (success)
- return rgn;
- return QRegion();
+ region = qt_region_from_HRGN(dest);
+
+ DeleteObject(hRgn);
+ DeleteObject(dest);
+
+ return region;
}
/*! \internal