better focus handling (blind fix)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2363,7 +2363,7 @@ bool wxGTKInputHandler::HandleMouse(wxControl *control,
|
|||||||
const wxMouseEvent& event)
|
const wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
// clicking on the control gives it focus
|
// clicking on the control gives it focus
|
||||||
if ( event.ButtonDown() )
|
if ( event.ButtonDown() && wxWindow::FindFocus() != control )
|
||||||
{
|
{
|
||||||
control->SetFocus();
|
control->SetFocus();
|
||||||
|
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: univ/themes/win32.cpp
|
// Name: univ/themes/win32.cpp
|
||||||
// Purpose: wxUniversal theme implementing Win32-like LNF
|
// Purpose: wxUniversal theme implementing Win32-like LNF
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
@@ -3056,6 +3055,14 @@ bool wxWin32InputHandler::HandleKey(wxControl *control,
|
|||||||
bool wxWin32InputHandler::HandleMouse(wxControl *control,
|
bool wxWin32InputHandler::HandleMouse(wxControl *control,
|
||||||
const wxMouseEvent& event)
|
const wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
|
// clicking on the control gives it focus
|
||||||
|
if ( event.ButtonDown() && wxWindow::FindFocus() != control )
|
||||||
|
{
|
||||||
|
control->SetFocus();
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user