Avoid wxGetTopLevelParent() which doesn't work for the strange TLWs which
override IsTopLevel() to return false, as wxMDIChildFrame does in wxMSW.
Using IsDescendant() works in any case and also is arguably more clear.
Closes #3063.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71025
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
// Is this the active frame (highlighted in the taskbar)?
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
// Is this the active frame (highlighted in the taskbar)?
- virtual bool IsActive() { return wxGetTopLevelParent(FindFocus()) == this; }
+ //
+ // A TLW is active only if it contains the currently focused window.
+ virtual bool IsActive() { return IsDescendant(FindFocus()); }
// this function may be overridden to return false to allow closing the
// application even when this top level window is still open
// this function may be overridden to return false to allow closing the
// application even when this top level window is still open