diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-03-21 17:17:44 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-24 18:00:44 +0100 |
commit | 5c6b2ede3bdfb5ba5eefb6e7cd7c5d3286a1e1b3 (patch) | |
tree | eaf309ba54ecfb953c75543dda16bb01d7f4ea7a /src/widgets | |
parent | 795468bdc68931a90454bd1c975f7de7ba670e3b (diff) |
OSX: WindowTransparentForInput QNSView pass events to next responder
The default implementation (in the super class) passes the event
to the next responder. This seems to be one valid way to handle
the Qt::WindowTransparentForInput flag. So if a non-alien widget
for which a native NSView is created has the flag
WA_TransparentForMouseEvents, that means the window will have
Qt::WindowTransparentForInput, and the NSView which is created
on its behalf will pass on each event so that other NSViews have
a chance to handle it. (It will also try to reject becoming
first responder, but that doesn't seem to be enough for the following
events to be passed on.) This is a followup to
I979be9f72f7d225d7b960fc5db4c3956d2749982 which purported to
obey the WindowTransparentForInput flag, but actually doesn't.
Change-Id: Ia72a3573c2e3cbfa7ede70bee41ac36df6924598
Task-number: QTBUG-28816
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 3e1e0f592c..0ef6b1735b 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1083,7 +1083,8 @@ void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w) else flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint; - + if (w->testAttribute(Qt::WA_TransparentForMouseEvents)) + flags |= Qt::WindowTransparentForInput; } void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) |