summaryrefslogtreecommitdiffstats
path: root/src/activeqt
diff options
context:
space:
mode:
Diffstat (limited to 'src/activeqt')
-rw-r--r--src/activeqt/control/qaxserverbase.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index b9d73a1..f3e1dff 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -4457,11 +4457,24 @@ bool QAxServerBase::eventFilter(QObject *o, QEvent *e)
case QEvent::Resize:
updateMask();
break;
- case QEvent::WindowBlocked:
+ case QEvent::WindowBlocked: {
if (!m_spInPlaceFrame)
break;
m_spInPlaceFrame->EnableModeless(FALSE);
+ MSG msg;
+ // Visual Basic 6.0 posts the message WM_USER+3078 from the EnableModeless().
+ // While handling this message, VB will disable all current top-levels. After
+ // this we have to re-enable the Qt modal widget to receive input events.
+ if (PeekMessage(&msg, 0, WM_USER+3078, WM_USER+3078, PM_REMOVE)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ QWidget *modalWidget = QApplication::activeModalWidget();
+ if (modalWidget && modalWidget->isVisible() && modalWidget->isEnabled()
+ && !IsWindowEnabled(modalWidget->effectiveWinId()))
+ EnableWindow(modalWidget->effectiveWinId(), TRUE);
+ }
break;
+ }
case QEvent::WindowUnblocked:
if (!m_spInPlaceFrame)
break;