From 666c6b5b18c013d4fe6eb67a4c7106047513e43a Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Wed, 24 Mar 2010 12:33:07 +0100 Subject: 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 --- src/gui/kernel/qwidget_mac.mm | 5 +++-- 1 file 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 -- cgit v0.12