summaryrefslogtreecommitdiff
path: root/wx+/focus.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-05-17 11:17:28 -0400
committerB Stack <bgstack15@gmail.com>2020-05-17 11:17:28 -0400
commitf0f3f094c5fa05bafe1963d1ea13f1be39a6673b (patch)
tree1f52055b2f26fc2389d3ab4eb8d8d1e234a6316a /wx+/focus.h
parentMerge branch '10.23' into 'master' (diff)
downloadFreeFileSync-f0f3f094c5fa05bafe1963d1ea13f1be39a6673b.tar.gz
FreeFileSync-f0f3f094c5fa05bafe1963d1ea13f1be39a6673b.tar.bz2
FreeFileSync-f0f3f094c5fa05bafe1963d1ea13f1be39a6673b.zip
add upstream 10.24
Diffstat (limited to 'wx+/focus.h')
-rw-r--r--wx+/focus.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/wx+/focus.h b/wx+/focus.h
index 4ba5f3f5..297d0754 100644
--- a/wx+/focus.h
+++ b/wx+/focus.h
@@ -24,6 +24,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)
{
for (wxWindow* wnd = child; wnd != nullptr; wnd = wnd->GetParent())
bgstack15