From afd66b3cb0922c1e30cb7d11cd381c5be1149967 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 1 Oct 2012 19:16:04 +0200 Subject: [PATCH] Mac: QComboBox wouldn't receive mouse events when shown within a modal dialog The mouse events were being stolen by the modal dialog, preventing the combo box to update itself. Key events were being properly forwarded, but this was probably due to the different way key events are being delivered. Change-Id: I5bfc4800fad9fd4122a212e6fdec13811a7e647b Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoawindow.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 4ef445c..1524c71 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -291,6 +291,10 @@ void QCocoaWindow::setVisible(bool visible) } else { [m_nsWindow orderFront: nil]; } + + // We want the events to properly reach the popup + if (window()->windowType() == Qt::Popup) + [(NSPanel *)m_nsWindow setWorksWhenModal:YES]; } } } else { -- 2.7.4