event. Usually for the purpose of showing an assertion dialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21794
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void SetNSView(WX_NSView cocoaNSView);
WX_NSView m_cocoaNSView;
WX_NSView m_dummyNSView;
void SetNSView(WX_NSView cocoaNSView);
WX_NSView m_cocoaNSView;
WX_NSView m_dummyNSView;
// ------------------------------------------------------------------------
// Implementation
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// Implementation
// ------------------------------------------------------------------------
m_cocoaNSView = NULL;
m_dummyNSView = NULL;
m_isBeingDeleted = FALSE;
m_cocoaNSView = NULL;
m_dummyNSView = NULL;
m_isBeingDeleted = FALSE;
bool wxWindowCocoa::Cocoa_drawRect(const NSRect &rect)
{
wxLogDebug("Cocoa_drawRect");
bool wxWindowCocoa::Cocoa_drawRect(const NSRect &rect)
{
wxLogDebug("Cocoa_drawRect");
+ // Recursion can happen if the event loop runs from within the paint
+ // handler. For instance, if an assertion dialog is shown.
+ // FIXME: This seems less than ideal.
+ if(m_isInPaint)
+ {
+ wxLogDebug("Paint event recursion!");
+ return false;
+ }
//FIXME: should probably turn that rect into the update region
//FIXME: should probably turn that rect into the update region
wxPaintEvent event(m_windowId);
event.SetEventObject(this);
wxPaintEvent event(m_windowId);
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ bool ret = GetEventHandler()->ProcessEvent(event);
+ m_isInPaint = FALSE;
+ return ret;
}
void wxWindowCocoa::InitMouseEvent(wxMouseEvent& event, WX_NSEvent cocoaEvent)
}
void wxWindowCocoa::InitMouseEvent(wxMouseEvent& event, WX_NSEvent cocoaEvent)