summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-03-24 11:33:07 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-03-24 11:38:47 (GMT)
commit666c6b5b18c013d4fe6eb67a4c7106047513e43a (patch)
tree518f320d12890a3857eb60c81be5c1b2f6d12043 /src/gui/kernel
parent63f13c0f2793fa0833d906be409f57362f6971d7 (diff)
downloadQt-666c6b5b18c013d4fe6eb67a4c7106047513e43a.zip
Qt-666c6b5b18c013d4fe6eb67a4c7106047513e43a.tar.gz
Qt-666c6b5b18c013d4fe6eb67a4c7106047513e43a.tar.bz2
Wrong position for foucs ring when used in QMacNativeWidget.
This widget is treated as a window by Qt, but with the embedded flag ON. setGeometry should not clip this window, it will be cliped automatically by the parent view of QMacNativeWidget. Task-number: QTBUG-9199 Reviewed-by: Denis
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget_mac.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index b3a6aec..ef7373c 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4067,7 +4067,8 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
QRect xrect = data.crect;
QRect parentWRect;
- if (q->isWindow() && topData()->embedded) {
+ bool isEmbeddedWindow = (q->isWindow() && topData()->embedded);
+ if (isEmbeddedWindow) {
#ifndef QT_MAC_USE_COCOA
HIViewRef parentView = HIViewGetSuperview(qt_mac_nativeview_for(q));
#else
@@ -4092,7 +4093,7 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
if (parentWRect.isValid()) {
// parent is clipped, and we have to clip to the same limit as parent
- if (!parentWRect.contains(xrect)) {
+ if (!parentWRect.contains(xrect) && !isEmbeddedWindow) {
xrect &= parentWRect;
wrect = xrect;
//translate from parent's to my Qt coord sys