Add wxPU_CONTAINS_CONTROLS style for wxPopupWindow
This restores the default behavior of a popup window in MSW to the
behavior it had before 56c4191168
. The new
flag added by this commit can be used to give the popup window the
behavior from after that commit, i.e. choose the implementation using a
WS_POPUP window rather than the default one using a WS_CHILD of the
desktop.
The old behavior kept the popup from taking focus from its parent window
but left some controls not working. The new behavior has the popup take
focus and lets all controls work.
Closes https://github.com/wxWidgets/wxWidgets/pull/1123
This commit is contained in:
committed by
Vadim Zeitlin
parent
8deb2cf0bb
commit
07f64c3b75
@@ -15,6 +15,15 @@
|
||||
|
||||
#if wxUSE_POPUPWIN
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxPopupWindow specific flags
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// This flag can be used in MSW if some controls are not working with the
|
||||
// default popup style.
|
||||
#define wxPU_CONTAINS_CONTROLS 0x0001
|
||||
|
||||
|
||||
#include "wx/nonownedwnd.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -124,6 +133,13 @@ public:
|
||||
wxPopupTransientWindow() { }
|
||||
wxPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE)
|
||||
{ Create(parent, style); }
|
||||
bool Create(wxWindow *parent, int style = wxBORDER_NONE)
|
||||
{
|
||||
return wxPopupTransientWindowBase::Create
|
||||
(
|
||||
parent, style | wxPU_CONTAINS_CONTROLS
|
||||
);
|
||||
}
|
||||
|
||||
// Implement base class pure virtuals.
|
||||
virtual void Popup(wxWindow *focus = NULL) wxOVERRIDE;
|
||||
|
Reference in New Issue
Block a user