Make GTKHandleDeferredFocusOut() non-static

Slightly simplify the code by making it a member function.

No real changes.
This commit is contained in:
Vadim Zeitlin
2018-02-03 23:56:44 +01:00
parent f8674c7ff0
commit 1148b2e0fe
2 changed files with 6 additions and 8 deletions

View File

@@ -3828,7 +3828,7 @@ bool wxWindowGTK::GTKShowFromOnIdle()
void wxWindowGTK::OnInternalIdle()
{
if ( gs_deferredFocusOut )
GTKHandleDeferredFocusOut();
gs_deferredFocusOut->GTKHandleDeferredFocusOut();
// Check if we have to show window now
if (GTKShowFromOnIdle()) return;
@@ -4348,7 +4348,7 @@ bool wxWindowGTK::GTKHandleFocusIn()
// otherwise we need to send focus-out first
wxASSERT_MSG ( gs_deferredFocusOut != this,
"GTKHandleFocusIn(GTKFocus_Normal) called even though focus changed back to itself - derived class should handle this" );
GTKHandleDeferredFocusOut();
gs_deferredFocusOut->GTKHandleDeferredFocusOut();
}
@@ -4459,20 +4459,18 @@ void wxWindowGTK::GTKHandleFocusOutNoDeferring()
GTKProcessEvent( event );
}
/*static*/
void wxWindowGTK::GTKHandleDeferredFocusOut()
{
// NB: See GTKHandleFocusOut() for explanation. This function is called
// from either GTKHandleFocusIn() or OnInternalIdle() to process
// deferred event.
wxWindowGTK *win = gs_deferredFocusOut;
// deferred event for this window.
gs_deferredFocusOut = NULL;
wxLogTrace(TRACE_FOCUS,
"processing deferred focus_out event for %s(%p, %s)",
win->GetClassInfo()->GetClassName(), win, win->GetLabel());
GetClassInfo()->GetClassName(), this, GetLabel());
win->GTKHandleFocusOutNoDeferring();
GTKHandleFocusOutNoDeferring();
}
void wxWindowGTK::SetFocus()