Corrected problem with MDI children not refreshing (removed WS_CLIPCHILDREN).
Double-fixed the LEAVE/ENTER bug... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -125,9 +125,7 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
|
|||||||
wxDebugMsg("Loaded m_windowMenu %d\n", m_windowMenu);
|
wxDebugMsg("Loaded m_windowMenu %d\n", m_windowMenu);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Adding WS_CLIPCHILDREN causes children not to be properly
|
DWORD msflags = WS_OVERLAPPED ;
|
||||||
// drawn when first displaying them.
|
|
||||||
DWORD msflags = WS_OVERLAPPED ; // | WS_CLIPCHILDREN ;
|
|
||||||
if (style & wxMINIMIZE_BOX)
|
if (style & wxMINIMIZE_BOX)
|
||||||
msflags |= WS_MINIMIZEBOX;
|
msflags |= WS_MINIMIZEBOX;
|
||||||
if (style & wxMAXIMIZE_BOX)
|
if (style & wxMAXIMIZE_BOX)
|
||||||
@@ -142,8 +140,11 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
|
|||||||
msflags |= WS_MAXIMIZE;
|
msflags |= WS_MAXIMIZE;
|
||||||
if (style & wxCAPTION)
|
if (style & wxCAPTION)
|
||||||
msflags |= WS_CAPTION;
|
msflags |= WS_CAPTION;
|
||||||
if (style & wxCLIP_CHILDREN)
|
|
||||||
msflags |= WS_CLIPCHILDREN;
|
// Adding WS_CLIPCHILDREN causes children not to be properly
|
||||||
|
// drawn when first displaying them.
|
||||||
|
// if (style & wxCLIP_CHILDREN)
|
||||||
|
// msflags |= WS_CLIPCHILDREN;
|
||||||
|
|
||||||
wxWindow::MSWCreate(m_windowId, parent, wxMDIFrameClassName, this, title, x, y, width, height,
|
wxWindow::MSWCreate(m_windowId, parent, wxMDIFrameClassName, this, title, x, y, width, height,
|
||||||
msflags);
|
msflags);
|
||||||
|
@@ -1936,11 +1936,11 @@ long wxWindow::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
|
|
||||||
long wxWindow::Default()
|
long wxWindow::Default()
|
||||||
{
|
{
|
||||||
// These are fake events, ignore them
|
// Ignore 'fake' events (perhaps generated as a result of a separate real event)
|
||||||
if (m_lastEvent != wxEVT_ENTER_WINDOW && m_lastEvent != wxEVT_LEAVE_WINDOW)
|
if (m_lastMsg == 0)
|
||||||
return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam);
|
|
||||||
else
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
|
bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
|
||||||
@@ -2444,6 +2444,8 @@ void wxWindow::MSWOnMouseEnter(const int x, const int y, const WXUINT flags)
|
|||||||
|
|
||||||
m_lastEvent = wxEVT_ENTER_WINDOW;
|
m_lastEvent = wxEVT_ENTER_WINDOW;
|
||||||
m_lastXPos = event.m_x; m_lastYPos = event.m_y;
|
m_lastXPos = event.m_x; m_lastYPos = event.m_y;
|
||||||
|
// No message - ensure we don't try to call the default behaviour accidentally.
|
||||||
|
m_lastMsg = 0;
|
||||||
GetEventHandler()->ProcessEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2462,6 +2464,8 @@ void wxWindow::MSWOnMouseLeave(const int x, const int y, const WXUINT flags)
|
|||||||
|
|
||||||
m_lastEvent = wxEVT_LEAVE_WINDOW;
|
m_lastEvent = wxEVT_LEAVE_WINDOW;
|
||||||
m_lastXPos = event.m_x; m_lastYPos = event.m_y;
|
m_lastXPos = event.m_x; m_lastYPos = event.m_y;
|
||||||
|
// No message - ensure we don't try to call the default behaviour accidentally.
|
||||||
|
m_lastMsg = 0;
|
||||||
GetEventHandler()->ProcessEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user