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)
+ win->PushEventHandler(new wxContextHelpEvtHandler(help));
+ else
+ win->PopEventHandler();
+
+ wxNode* node = win->GetChildren().First();
+ while (node)
+ {
+ wxWindow* child = (wxWindow*) node->Data();
+ wxPushOrPopEventHandlers(help, child, push);
+
+ node = node->Next();
+ }
+}
+#endif
+
// Begin 'context help mode'
bool wxContextHelp::BeginContextHelp(wxWindow* win)
{
// wxSetCursor(cursor);
#endif
+ m_status = FALSE;
+
win->PushEventHandler(new wxContextHelpEvtHandler(this));
+ //wxPushOrPopEventHandlers(this, win, TRUE);
win->CaptureMouse();
win->ReleaseMouse();
win->PopEventHandler(TRUE);
+ //wxPushOrPopEventHandlers(this, win, FALSE);
win->SetCursor(oldCursor);
(event.GetEventType() == wxEVT_ACTIVATE) ||
(event.GetEventType() == wxEVT_MOUSE_CAPTURE_CHANGED))
{
- m_contextHelp->SetStatus(FALSE);
+ // May have already been set to TRUE by a left-click
+ //m_contextHelp->SetStatus(FALSE);
m_contextHelp->EndContextHelp();
return TRUE;
}
*/
#if !defined(__WXMSW__)
-static char * csquery_xpm[] = {
+static const char * csquery_xpm[] = {
"12 11 2 1",
" c None",
". c #000000",