we must store the to be focused window before we kill focus on a window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -68,6 +68,9 @@
|
|||||||
|
|
||||||
static wxWindowX11* g_captureWindow = NULL;
|
static wxWindowX11* g_captureWindow = NULL;
|
||||||
static GC g_eraseGC;
|
static GC g_eraseGC;
|
||||||
|
// the window that is about to be focused after curretnly focused
|
||||||
|
// one looses focus:
|
||||||
|
static wxWindow* gs_toBeFocusedWindow = NULL;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// macros
|
// macros
|
||||||
@@ -397,7 +400,11 @@ void wxWindowX11::SetFocus()
|
|||||||
return; // nothing to do, focused already
|
return; // nothing to do, focused already
|
||||||
|
|
||||||
if ( focusedWindow )
|
if ( focusedWindow )
|
||||||
|
{
|
||||||
|
gs_toBeFocusedWindow = (wxWindow*)this;
|
||||||
focusedWindow->KillFocus();
|
focusedWindow->KillFocus();
|
||||||
|
gs_toBeFocusedWindow = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (GetName() == "scrollBar")
|
if (GetName() == "scrollBar")
|
||||||
@@ -445,6 +452,7 @@ void wxWindowX11::KillFocus()
|
|||||||
|
|
||||||
wxFocusEvent event(wxEVT_KILL_FOCUS, GetId());
|
wxFocusEvent event(wxEVT_KILL_FOCUS, GetId());
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
|
event.SetWindow(gs_toBeFocusedWindow);
|
||||||
HandleWindowEvent(event);
|
HandleWindowEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user