Cured last focus bug (I hope); some wxMotif mods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -308,14 +308,6 @@ wxWindow::wxWindow()
|
||||
// Destructor
|
||||
wxWindow::~wxWindow()
|
||||
{
|
||||
// Remove potential dangling pointer
|
||||
if (GetParent() && GetParent()->IsKindOf(CLASSINFO(wxPanel)))
|
||||
{
|
||||
wxPanel* panel = (wxPanel*) GetParent();
|
||||
if (panel->GetLastFocus() == this)
|
||||
panel->SetLastFocus((wxWindow*) NULL);
|
||||
}
|
||||
|
||||
m_isBeingDeleted = TRUE;
|
||||
|
||||
// first of all, delete the things on which nothing else depends
|
||||
@@ -1763,7 +1755,7 @@ bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd))
|
||||
wxWindow *parent = GetParent();
|
||||
if ( parent && parent->IsKindOf(CLASSINFO(wxPanel)) )
|
||||
{
|
||||
((wxPanel *)parent)->SetLastFocus(this);
|
||||
((wxPanel *)parent)->SetLastFocus(GetId());
|
||||
}
|
||||
|
||||
wxFocusEvent event(wxEVT_SET_FOCUS, m_windowId);
|
||||
@@ -2201,7 +2193,7 @@ bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
|
||||
long wxWindow::MSWOnSysCommand(WXWPARAM wParam, WXLPARAM lParam)
|
||||
{
|
||||
switch (wParam && 0xFFFFFFF0)
|
||||
switch (wParam & 0xFFFFFFF0)
|
||||
{
|
||||
case SC_MAXIMIZE:
|
||||
{
|
||||
|
Reference in New Issue
Block a user