summaryrefslogtreecommitdiff
path: root/wx+/window_tools.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-06-23 16:51:52 -0400
committerB. Stack <bgstack15@gmail.com>2024-06-23 16:51:52 -0400
commit994ec9e1cba547bed6eef02f996ca2a7beaf777a (patch)
treec6bdfb8c2096a1c579d3603e050d5f697d2306e0 /wx+/window_tools.h
parentadd upstream 13.6 (diff)
downloadFreeFileSync-994ec9e1cba547bed6eef02f996ca2a7beaf777a.tar.gz
FreeFileSync-994ec9e1cba547bed6eef02f996ca2a7beaf777a.tar.bz2
FreeFileSync-994ec9e1cba547bed6eef02f996ca2a7beaf777a.zip
add upstream 13.713.7
Diffstat (limited to 'wx+/window_tools.h')
-rw-r--r--wx+/window_tools.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/wx+/window_tools.h b/wx+/window_tools.h
index 94cb2c32..45f43556 100644
--- a/wx+/window_tools.h
+++ b/wx+/window_tools.h
@@ -79,7 +79,10 @@ struct FocusPreserver
if (oldFocusId_ != wxID_ANY)
if (wxWindow* oldFocusWin = wxWindow::FindWindowById(oldFocusId_))
+ {
+ assert(oldFocusWin->IsEnabled()); //only enabled windows can have focus, so why wouldn't it be anymore?
setFocusIfActive(*oldFocusWin);
+ }
}
wxWindowID getFocusId() const { return oldFocusId_; }
bgstack15