From f0f3f094c5fa05bafe1963d1ea13f1be39a6673b Mon Sep 17 00:00:00 2001 From: B Stack Date: Sun, 17 May 2020 11:17:28 -0400 Subject: add upstream 10.24 --- wx+/focus.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'wx+/focus.h') diff --git a/wx+/focus.h b/wx+/focus.h index 4ba5f3f5..297d0754 100644 --- a/wx+/focus.h +++ b/wx+/focus.h @@ -23,6 +23,18 @@ bool isComponentOf(const wxWindow* child, const wxWindow* top) } +inline +wxWindow& getRootWindow(wxWindow& child) +{ + wxWindow* root = &child; + for (;;) + if (wxWindow* parent = root->GetParent()) + root = parent; + else + return *root; +} + + inline wxTopLevelWindow* getTopLevelWindow(wxWindow* child) { -- cgit