Removed wxWS_EX_NO_AUTOFOCUS (use AcceptsFocus instead)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -897,9 +897,6 @@ enum wxStretch
|
||||
// descend into all subwindows
|
||||
#define wxWS_EX_VALIDATE_RECURSIVELY 0x00000001
|
||||
|
||||
// Don't automatically set the focus when left-clicking on the window
|
||||
#define wxWS_EX_NO_AUTOFOCUS 0x10000000
|
||||
|
||||
/*
|
||||
* wxFrame/wxDialog style flags
|
||||
*/
|
||||
|
@@ -407,6 +407,9 @@ public:
|
||||
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
|
||||
virtual void DoToolbarUpdates();
|
||||
|
||||
// Don't want toolbars to accept the focus
|
||||
bool AcceptsFocus() const { return FALSE; }
|
||||
|
||||
protected:
|
||||
// to implement in derived classes
|
||||
// -------------------------------
|
||||
|
@@ -205,9 +205,6 @@ bool wxToolBar::Create(wxWindow *parent,
|
||||
long style,
|
||||
const wxString& name)
|
||||
{
|
||||
// Don't want to grab the focus when we left click
|
||||
SetExtraStyle(GetExtraStyle() | wxWS_EX_NO_AUTOFOCUS);
|
||||
|
||||
// common initialisation
|
||||
if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
|
@@ -1897,7 +1897,7 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
// set focus to this window
|
||||
if ((GetExtraStyle() & wxWS_EX_NO_AUTOFOCUS) != wxWS_EX_NO_AUTOFOCUS)
|
||||
if (AcceptsFocus())
|
||||
SetFocus();
|
||||
|
||||
// fall through
|
||||
|
Reference in New Issue
Block a user