refine the implementation of SetFocus, clean up unused static variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -68,11 +68,6 @@
|
|||||||
|
|
||||||
static wxWindowX11* g_captureWindow = NULL;
|
static wxWindowX11* g_captureWindow = NULL;
|
||||||
static GC g_eraseGC;
|
static GC g_eraseGC;
|
||||||
// the window that has keyboard focus:
|
|
||||||
static wxWindow* gs_focusedWindow = NULL;
|
|
||||||
// the window that is about to be focused after currently focused
|
|
||||||
// one looses focus:
|
|
||||||
static wxWindow* gs_toBeFocusedWindow = NULL;
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// macros
|
// macros
|
||||||
@@ -396,11 +391,13 @@ void wxWindowX11::SetFocus()
|
|||||||
if (!AcceptsFocus())
|
if (!AcceptsFocus())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( DoFindFocus() == (wxWindow*)this )
|
wxWindow* focusedWindow = DoFindFocus();
|
||||||
|
|
||||||
|
if ( focusedWindow == (wxWindow*)this )
|
||||||
return; // nothing to do, focused already
|
return; // nothing to do, focused already
|
||||||
|
|
||||||
if ( DoFindFocus() )
|
if ( focusedWindow )
|
||||||
DoFindFocus()->KillFocus();
|
focusedWindow->KillFocus();
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (GetName() == "scrollBar")
|
if (GetName() == "scrollBar")
|
||||||
|
Reference in New Issue
Block a user