From 74517856ca0d85d58cd6f7b75364097b9cc15e95 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 9 Jun 2024 13:18:32 -0400 Subject: [PATCH] Make touchscreen events Windows-only They break things on macOS and probably also on GTK according to the wxWidgets documentation. --- 3d-viewer/3d_canvas/eda_3d_canvas.cpp | 2 ++ common/view/wx_view_controls.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/3d-viewer/3d_canvas/eda_3d_canvas.cpp b/3d-viewer/3d_canvas/eda_3d_canvas.cpp index 1442563bea..2a2f53fa5a 100644 --- a/3d-viewer/3d_canvas/eda_3d_canvas.cpp +++ b/3d-viewer/3d_canvas/eda_3d_canvas.cpp @@ -149,7 +149,9 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const wxGLAttributes& aGLAttrib wxASSERT( a3DCachePointer != nullptr ); m_boardAdapter.Set3dCacheManager( a3DCachePointer ); +#ifdef __WXMSW__ EnableTouchEvents( wxTOUCH_ZOOM_GESTURE | wxTOUCH_PAN_GESTURES | wxTOUCH_ROTATE_GESTURE ); +#endif const wxEventType events[] = { diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index e7a0ebb0f5..462ca5bb45 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -133,6 +133,7 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, EDA_DRAW_PANEL_GAL* aParentPane wxMouseEventHandler( WX_VIEW_CONTROLS::onCaptureLost ), nullptr, this ); #endif +#ifdef __WXMSW__ if( m_parentPanel->EnableTouchEvents( wxTOUCH_ZOOM_GESTURE | wxTOUCH_PAN_GESTURES ) ) { m_parentPanel->Connect( wxEVT_GESTURE_ZOOM, @@ -143,6 +144,7 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, EDA_DRAW_PANEL_GAL* aParentPane wxPanGestureEventHandler( WX_VIEW_CONTROLS::onPanGesture ), nullptr, this ); } +#endif m_cursorWarped = false;