Workaround for _SetDstBlits32BGRA crash when compiling and running
on Leopard (happens in complex app but not in AUI sample) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@57862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4014,7 +4014,16 @@ void wxAuiManager::OnLeftUp(wxMouseEvent& event)
|
|||||||
m_frame->ReleaseMouse();
|
m_frame->ReleaseMouse();
|
||||||
|
|
||||||
// get rid of the hint rectangle
|
// get rid of the hint rectangle
|
||||||
|
|
||||||
|
// On Mac we use a wxClientDC since when compiling and running on Leopard,
|
||||||
|
// we can get the dreaded _SetDstBlits32BGRA crash (but not in the AUI sample).
|
||||||
|
// This only helps in non-CG mode - there is zero resize feeedback in CG mode
|
||||||
|
// at present.
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
wxClientDC dc(m_frame);
|
||||||
|
#else
|
||||||
wxScreenDC dc;
|
wxScreenDC dc;
|
||||||
|
#endif
|
||||||
DrawResizeHint(dc, m_action_hintrect);
|
DrawResizeHint(dc, m_action_hintrect);
|
||||||
|
|
||||||
// resize the dock or the pane
|
// resize the dock or the pane
|
||||||
@@ -4286,10 +4295,20 @@ void wxAuiManager::OnMotion(wxMouseEvent& event)
|
|||||||
else
|
else
|
||||||
pos.x = wxMax(0, event.m_x - m_action_offset.x);
|
pos.x = wxMax(0, event.m_x - m_action_offset.x);
|
||||||
|
|
||||||
wxRect rect(m_frame->ClientToScreen(pos),
|
// On Mac we use a wxClientDC since when compiling and running on Leopard,
|
||||||
m_action_part->rect.GetSize());
|
// we can get the dreaded _SetDstBlits32BGRA crash (but not in the AUI sample).
|
||||||
|
// This only helps in non-CG mode - there is zero resize feeedback in CG mode
|
||||||
|
// at present.
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
wxRect rect(pos,
|
||||||
|
m_action_part->rect.GetSize());
|
||||||
|
|
||||||
|
wxClientDC dc(m_frame);
|
||||||
|
#else
|
||||||
|
wxRect rect(m_frame->ClientToScreen(pos),
|
||||||
|
m_action_part->rect.GetSize());
|
||||||
wxScreenDC dc;
|
wxScreenDC dc;
|
||||||
|
#endif
|
||||||
if (!m_action_hintrect.IsEmpty())
|
if (!m_action_hintrect.IsEmpty())
|
||||||
DrawResizeHint(dc, m_action_hintrect);
|
DrawResizeHint(dc, m_action_hintrect);
|
||||||
DrawResizeHint(dc, rect);
|
DrawResizeHint(dc, rect);
|
||||||
|
Reference in New Issue
Block a user