Implement dismissal for unfocused wxPopupTransientWindow
Popups not using wxPU_CONTAINS_CONTROLS were not automatically dismissed at all any longer, as the only auto-dismissal mechanism related on getting WM_ACTIVATE, which they never did, so implement a different logic for dismissing them: do it on any change of focus and also any mouse press (but not move and not key press neither). This will allow not using wxPU_CONTAINS_CONTROLS for popups that don't need focus, but still must disappear on their own.
This commit is contained in:
@@ -40,6 +40,10 @@ public:
|
||||
// Return the top level window parent of this popup or null.
|
||||
wxWindow* MSWGetOwner() const { return m_owner; }
|
||||
|
||||
// This is a way to notify non-wxPU_CONTAINS_CONTROLS windows about the
|
||||
// events that should result in their dismissal.
|
||||
virtual void MSWDismissUnfocusedPopup() { }
|
||||
|
||||
private:
|
||||
wxWindow* m_owner;
|
||||
|
||||
|
Reference in New Issue
Block a user