diff --git a/src/wxwindow/src/msw/wx_pdf.cxx b/src/wxwindow/src/msw/wx_pdf.cxx index 84d62d58a1..ddf9ce3ac9 100644 --- a/src/wxwindow/src/msw/wx_pdf.cxx +++ b/src/wxwindow/src/msw/wx_pdf.cxx @@ -43,8 +43,6 @@ static long DoPrim(void *data) pdf = _data->f; - wxCannotHideCursor(); - _data->result = pdf(_data->data, _data->hwnd); _data->done = 1; @@ -54,8 +52,6 @@ static long DoPrim(void *data) anything to MrEd). */ PostThreadMessage(_data->main_thread_id, WM_APP + 79, 0, 0); - wxCanHideCursor(); - return 0; } @@ -126,7 +122,9 @@ BOOL wxPrimitiveDialog(wxPDF f, void *data, int strict) } } } - + + wxCannotHideCursor(); + if (!(th = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)DoPrim, _data, 0, &id))) { /* Thread creation failed! We're in trouble, but do `f' anyway. */ result = f(data, top); @@ -148,6 +146,8 @@ BOOL wxPrimitiveDialog(wxPDF f, void *data, int strict) result = _data->result; } + wxCanHideCursor(); + free(_data); /* Restore other windows: */