diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-15 16:30:10 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-15 16:31:48 +0200 |
commit | 106d3b9bf93325ea93c678270290b2c3dda9b764 (patch) | |
tree | 26c56932d60964c83e81d9c33d6f37ebc36d6c56 /src/plugins/platforms/cocoa/qcocoawindow.mm | |
parent | 79f679da9483c12979500dd48bc096d33af9ca6f (diff) | |
parent | 8bebded9ab02b8eec67c44bfddf802d6bf9cda3c (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/plugins/platforms/cocoa/qcocoamenu.h
src/plugins/platforms/cocoa/qcocoamenu.mm
src/plugins/platforms/cocoa/qcocoawindow.mm
src/widgets/styles/qstylehelper_p.h
Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 7a19303f5d..6cdabf606b 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -588,7 +588,16 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags) } setWindowZoomButton(flags); - m_view.window.ignoresMouseEvents = flags & Qt::WindowTransparentForInput; + // Make window ignore mouse events if WindowTransparentForInput is set. + // Note that ignoresMouseEvents has a special initial state where events + // are ignored (passed through) based on window transparency, and that + // setting the property to false does not return us to that state. Instead, + // this makes the window capture all mouse events. Take care to only + // set the property if needed. FIXME: recreate window if needed or find + // some other way to implement WindowTransparentForInput. + bool ignoreMouse = flags & Qt::WindowTransparentForInput; + if (m_view.window.ignoresMouseEvents != ignoreMouse) + m_view.window.ignoresMouseEvents = ignoreMouse; } m_windowFlags = flags; |