Fix apparent activation loss after hiding previous popup

Commit 58d4b0e209 introduced a regression:
if a previous popup still existed when the new one was shown, dismissing
the second popup would result in the owner window losing its "active"
appearance.

This was due to the fact that ::GetActiveWindow() still returned the
former popup when it was about to be dismissed, so it was too early to
call it in WM_NCACTIVATE handler. Do it now in DismissOnDeactivate()
itself which is both simpler and more correct.
This commit is contained in:
Vadim Zeitlin
2019-04-02 18:13:27 +02:00
parent 1f64877ca4
commit 9f95e86e76
2 changed files with 8 additions and 9 deletions

View File

@@ -152,7 +152,7 @@ public:
WXLPARAM lParam) wxOVERRIDE;
private:
void DismissOnDeactivate(WXHWND hwndActive);
void DismissOnDeactivate();
wxDECLARE_DYNAMIC_CLASS(wxPopupTransientWindow);
wxDECLARE_NO_COPY_CLASS(wxPopupTransientWindow);