Make wxGTK code returning correct focus in popup menu presence more robust.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Apr 2012 22:25:26 +0000 (22:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Apr 2012 22:25:26 +0000 (22:25 +0000)
commit39258ad7965f272f0f0ace2c516669df0b50145f
tree3e5743d17cb6c4fee1c631613d78ac83eff33a32
parent7e7ba0dfc58a4188c6ff2abe22b8fd46c9de70fb
Make wxGTK code returning correct focus in popup menu presence more robust.

Replace the changes of r69938 with an alternative and simpler solution:
instead of playing games with gs_pendingFocus, which could break down if its
old value became invalid while the menu was shown as happened if one of the
menu commands resulted in this window being destroyed, just take the currently
shown popup menu into account in DoFindFocus() itself.

This should be safer as there is no danger of any dangling pointers here and
is also simpler and more obviously correct.

Closes #14103.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/gtk/window.cpp