X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23205be83c2a88b1aa7204d2cee52ca8a755e698..0286d08d1453506f9ff9a830d58b3b35817d0b14:/src/univ/themes/win32.cpp?ds=inline diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 12b176ac04..3603333f2b 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -3196,10 +3196,9 @@ bool wxWin32InputHandler::HandleMouse(wxInputConsumer *control, // clicking on the control gives it focus if ( event.ButtonDown() ) { - wxWindow *win = control->GetInputWindow(); + wxWindow * const win = control->GetInputWindow(); - if ( (wxWindow::FindFocus() != control->GetInputWindow()) && - win->AcceptsFocus() ) + if ( win->CanAcceptFocus() && wxWindow::FindFocus() != win ) { win->SetFocus();