EndContextHelp();
}
+// Not currently needed, but on some systems capture may not work as
+// expected so we'll leave it here for now.
+#if 0
static void wxPushOrPopEventHandlers(wxContextHelp* help, wxWindow* win, bool push)
{
if (push)
node = node->Next();
}
}
+#endif
// Begin 'context help mode'
bool wxContextHelp::BeginContextHelp(wxWindow* win)
m_status = FALSE;
-// win->PushEventHandler(new wxContextHelpEvtHandler(this));
- wxPushOrPopEventHandlers(this, win, TRUE);
+ win->PushEventHandler(new wxContextHelpEvtHandler(this));
+ //wxPushOrPopEventHandlers(this, win, TRUE);
win->CaptureMouse();
win->ReleaseMouse();
-// win->PopEventHandler(TRUE);
- wxPushOrPopEventHandlers(this, win, FALSE);
+ win->PopEventHandler(TRUE);
+ //wxPushOrPopEventHandlers(this, win, FALSE);
win->SetCursor(oldCursor);
y = GET_Y_LPARAM(lParam);
// redirect the event to a static control if necessary
- wxWindow *win = FindWindowForMouseEvent(this, &x, &y);
-
- processed = win->HandleMouseEvent(message, x, y, wParam);
+ if (this == GetCapture())
+ {
+ processed = HandleMouseEvent(message, x, y, wParam);
+ }
+ else
+ {
+ wxWindow *win = FindWindowForMouseEvent(this, &x, &y);
+ processed = win->HandleMouseEvent(message, x, y, wParam);
+ }
}
}
break;