diff options
author | B Stack <bgstack15@gmail.com> | 2020-10-03 01:04:14 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-10-03 01:04:14 +0000 |
commit | 0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c (patch) | |
tree | d8a89392817379e3036c42eedebf33d4fb372dfd /wx+/focus.h | |
parent | Merge branch '11.1' into 'master' (diff) | |
parent | add upstream 11.2 (diff) | |
download | FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.tar.gz FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.tar.bz2 FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.zip |
Merge branch '11.2' into 'master'11.2
add upstream 11.2
See merge request opensource-tracking/FreeFileSync!26
Diffstat (limited to 'wx+/focus.h')
-rw-r--r-- | wx+/focus.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/wx+/focus.h b/wx+/focus.h index 297d0754..2920828f 100644 --- a/wx+/focus.h +++ b/wx+/focus.h @@ -45,15 +45,14 @@ wxTopLevelWindow* getTopLevelWindow(wxWindow* child) } -/* -Preserving input focus has to be more clever than: - wxWindow* oldFocus = wxWindow::FindFocus(); - ZEN_ON_SCOPE_EXIT(if (oldFocus) oldFocus->SetFocus()); +/* Preserving input focus has to be more clever than: + wxWindow* oldFocus = wxWindow::FindFocus(); + ZEN_ON_SCOPE_EXIT(if (oldFocus) oldFocus->SetFocus()); => wxWindow::SetFocus() internally calls Win32 ::SetFocus, which calls ::SetActiveWindow, which - lord knows why - changes the foreground window to the focus window even if the user is currently busy using a different app! More curiosity: this foreground focus stealing happens only during the *first* SetFocus() after app start! - It also can be avoided by changing focus back and forth with some other app after start => wxWidgets bug or Win32 feature??? -*/ + It also can be avoided by changing focus back and forth with some other app after start => wxWidgets bug or Win32 feature??? */ + struct FocusPreserver { FocusPreserver() |