Prevent focus stealing in some Linux WMs
OnEnter events will only raise the windows within KiCad rather than
between applications
Fixes https://gitlab.com/kicad/code/kicad/issues/10809
(cherry picked from commit 110728af48
)
This commit is contained in:
parent
38a7cb9731
commit
7128f6adf0
|
@ -452,7 +452,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
||||||
{
|
{
|
||||||
wxWindow* holderWindow = dynamic_cast<wxWindow*>( m_toolMgr->GetToolHolder() );
|
wxWindow* holderWindow = dynamic_cast<wxWindow*>( m_toolMgr->GetToolHolder() );
|
||||||
|
|
||||||
#if defined( _WIN32 )
|
#if defined( _WIN32 ) || defined( __WXGTK__ )
|
||||||
// Mouse events may trigger regardless of window status (windows feature)
|
// Mouse events may trigger regardless of window status (windows feature)
|
||||||
// However we need to avoid focus fighting (especially modals)
|
// However we need to avoid focus fighting (especially modals)
|
||||||
if( holderWindow && KIPLATFORM::UI::IsWindowActive( holderWindow ) )
|
if( holderWindow && KIPLATFORM::UI::IsWindowActive( holderWindow ) )
|
||||||
|
|
|
@ -459,8 +459,8 @@ void WX_VIEW_CONTROLS::onEnter( wxMouseEvent& aEvent )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( _WIN32 )
|
#if defined( _WIN32 ) || defined( __WXGTK__ )
|
||||||
// Win32 transmits mouse move and wheel events to all controls below the mouse regardless
|
// Win32 and some *nix WMs transmit mouse move and wheel events to all controls below the mouse regardless
|
||||||
// of focus. Forcing the focus here will cause the EDA FRAMES to immediately become the
|
// of focus. Forcing the focus here will cause the EDA FRAMES to immediately become the
|
||||||
// top level active window.
|
// top level active window.
|
||||||
if( m_parentPanel->GetParent() != nullptr )
|
if( m_parentPanel->GetParent() != nullptr )
|
||||||
|
|
Loading…
Reference in New Issue