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:
Julian Smart
1999-02-18 21:24:11 +00:00
parent dd0e574a0e
commit 0492c5a094
12 changed files with 72 additions and 59 deletions

View File

@@ -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:
{