Start cleaning out wx/wx.h in cpp files
This commit is contained in:
parent
8f2819cfa4
commit
69d7a23e1c
|
@ -22,7 +22,8 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wx/wx.h>
|
#include <wx/string.h>
|
||||||
|
#include <wx/translation.h>
|
||||||
#include <ki_exception.h>
|
#include <ki_exception.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <wx/wx.h> // _()
|
#include <wx/translation.h>
|
||||||
|
|
||||||
#include <macros.h> // TO_UTF8()
|
#include <macros.h> // TO_UTF8()
|
||||||
#include <lib_id.h>
|
#include <lib_id.h>
|
||||||
|
|
|
@ -40,10 +40,10 @@
|
||||||
|
|
||||||
#include <core/arraydim.h>
|
#include <core/arraydim.h>
|
||||||
#include <core/optional.h>
|
#include <core/optional.h>
|
||||||
|
#include <wx/log.h>
|
||||||
#include <wx/stc/stc.h>
|
#include <wx/stc/stc.h>
|
||||||
#include <kiplatform/app.h>
|
#include <kiplatform/app.h>
|
||||||
|
#include <kiplatform/ui.h>
|
||||||
#include <wx/wx.h> // for GetForegroundWindow() on wxMSW
|
|
||||||
|
|
||||||
///< Stores information about a mouse button state
|
///< Stores information about a mouse button state
|
||||||
struct TOOL_DISPATCHER::BUTTON_STATE
|
struct TOOL_DISPATCHER::BUTTON_STATE
|
||||||
|
@ -450,7 +450,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
||||||
#if defined( _WIN32 )
|
#if defined( _WIN32 )
|
||||||
// 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 && holderWindow->GetHWND() == GetForegroundWindow() )
|
if( holderWindow && KIPLATFORM::UI::IsWindowActive( holderWindow ) )
|
||||||
#else
|
#else
|
||||||
if( holderWindow )
|
if( holderWindow )
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,8 +37,9 @@
|
||||||
#include <math/util.h> // for KiROUND
|
#include <math/util.h> // for KiROUND
|
||||||
#include <widgets/ui_common.h>
|
#include <widgets/ui_common.h>
|
||||||
#include <class_draw_panel_gal.h>
|
#include <class_draw_panel_gal.h>
|
||||||
|
#include <kiplatform/ui.h>
|
||||||
|
#include <wx/log.h>
|
||||||
|
|
||||||
#include <wx/wx.h> // for GetForegroundWindow() on wxMSW
|
|
||||||
|
|
||||||
#if defined __WXMSW__
|
#if defined __WXMSW__
|
||||||
#define USE_MOUSE_CAPTURE
|
#define USE_MOUSE_CAPTURE
|
||||||
|
@ -455,7 +456,7 @@ void WX_VIEW_CONTROLS::onEnter( wxMouseEvent& aEvent )
|
||||||
if( m_parentPanel->GetParent() != nullptr )
|
if( m_parentPanel->GetParent() != nullptr )
|
||||||
{
|
{
|
||||||
// this assumes the parent panel's parent is the eda window
|
// this assumes the parent panel's parent is the eda window
|
||||||
if( GetForegroundWindow() == m_parentPanel->GetParent()->GetHWND() )
|
if( KIPLATFORM::UI::IsWindowActive( m_parentPanel->GetParent() ) )
|
||||||
{
|
{
|
||||||
m_parentPanel->SetFocus();
|
m_parentPanel->SetFocus();
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ bool KIPLATFORM::UI::IsWindowActive( wxWindow* aWindow )
|
||||||
{
|
{
|
||||||
if(! aWindow )
|
if(! aWindow )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ( aWindow->GetHWND() == GetForegroundWindow() );
|
return ( aWindow->GetHWND() == GetForegroundWindow() );
|
||||||
|
|
Loading…
Reference in New Issue