summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-08-24 13:40:35 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-08-25 09:50:43 (GMT)
commitf29e1bc7b7a593ef65defa3543b0feea455c7cdb (patch)
tree5ecc60a34015593b57d31a4efddd4c6c3868307f /src/gui/kernel/qwidget_mac.mm
parent913d75047dd5aa4a8e1d9b51a58c7be7e75f3d89 (diff)
downloadQt-f29e1bc7b7a593ef65defa3543b0feea455c7cdb.zip
Qt-f29e1bc7b7a593ef65defa3543b0feea455c7cdb.tar.gz
Qt-f29e1bc7b7a593ef65defa3543b0feea455c7cdb.tar.bz2
Cocoa: bugfix for autocads plugin project
Seems like the QMacNativeWidget was almost not testet at all. It all breaks down when embedding QLineEdits (with respect to focus). This is a first patch that fixes this issue.
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r--src/gui/kernel/qwidget_mac.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index ea5a53e..53d1b6e 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -301,6 +301,14 @@ bool qt_mac_is_macdrawer(const QWidget *w)
return (w && w->parentWidget() && w->windowType() == Qt::Drawer);
}
+bool qt_mac_insideKeyWindow(const QWidget *w)
+{
+#ifdef QT_MAC_USE_COCOA
+ return [[reinterpret_cast<NSView *>(w->winId()) window] isKeyWindow];
+#endif
+ return false;
+}
+
bool qt_mac_set_drawer_preferred_edge(QWidget *w, Qt::DockWidgetArea where) //users of Qt for Mac OS X can use this..
{
if(!qt_mac_is_macdrawer(w))