Cocoa: Support Qt::WindowTransparentForInput

Map this to ignoresMouseEvents on NSWindow.

Task-number: QTBUG-45498
Change-Id: I86e518bbf805647d9f12b1af1747355ef55cc167
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
This commit is contained in:
Morten Johan Sørvig 2015-09-21 13:29:17 +02:00 committed by Timur Pocheptsov
parent c619d2daac
commit 3ea04c7d38

View File

@ -1344,6 +1344,9 @@ void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow)
[m_contentView setHidden: YES];
}
m_nsWindow.ignoresMouseEvents =
(window()->flags() & Qt::WindowTransparentForInput) == Qt::WindowTransparentForInput;
const qreal opacity = qt_window_private(window())->opacity;
if (!qFuzzyCompare(opacity, qreal(1.0)))
setOpacity(opacity);