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() );
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#if defined( _WIN32 ) || defined( __WXGTK__ )
|
||||
// Mouse events may trigger regardless of window status (windows feature)
|
||||
// However we need to avoid focus fighting (especially modals)
|
||||
if( holderWindow && KIPLATFORM::UI::IsWindowActive( holderWindow ) )
|
||||
|
|
|
@ -459,8 +459,8 @@ void WX_VIEW_CONTROLS::onEnter( wxMouseEvent& aEvent )
|
|||
return;
|
||||
}
|
||||
|
||||
#if defined( _WIN32 )
|
||||
// Win32 transmits mouse move and wheel events to all controls below the mouse regardless
|
||||
#if defined( _WIN32 ) || defined( __WXGTK__ )
|
||||
// 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
|
||||
// top level active window.
|
||||
if( m_parentPanel->GetParent() != nullptr )
|
||||
|
|
Loading…
Reference in New Issue