gtk3: Force GTK2-style input handling

GTK3 provides for additional input devices via xinput2.  These include
touchscreens and continuous scroll devices.  But wxWidgets does not have
specialized handlers for these events, so they double up for some
devices.  Until wxWidgets allows us to handle these events, we specify
that the input handler should be the old-style GDK_CORE.
This commit is contained in:
Seth Hillbrand 2019-02-19 06:03:19 -08:00
parent b426b9e784
commit 484c1f63ba
3 changed files with 8 additions and 1 deletions

View File

@ -138,6 +138,9 @@ struct APP_SINGLE_TOP : public wxApp
// Disable overlay scrollbars as they mess up wxWidgets window sizing and cause excessive redraw requests
wxSetEnv( wxT( "GTK_OVERLAY_SCROLLING" ), wxT( "0" ) );
// Set GTK2-style input instead of xinput2. This disables touchscreen and smooth scrolling
// Needed to ensure that we are not getting multiple mouse scroll events
wxSetEnv( wxT( "GDK_CORE_DEVICE_EVENTS" ), wxT( "1" ) );
}
#endif

View File

@ -138,7 +138,7 @@ public:
double GetScaleForRotation( int aRotation ) override;
/// A suitable (magic) scale factor for GTK3 systems
static constexpr double GTK3_SCALE = 0.001;
static constexpr double GTK3_SCALE = 0.002;
/// A suitable (magic) scale factor for Mac systems
static constexpr double MAC_SCALE = 0.01;

View File

@ -232,6 +232,10 @@ struct APP_KICAD : public wxApp
// Disable overlay scrollbars as they mess up wxWidgets window sizing and cause excessive redraw requests
wxSetEnv( wxT( "GTK_OVERLAY_SCROLLING" ), wxT( "0" ) );
// Set GTK2-style input instead of xinput2. This disables touchscreen and smooth scrolling
// Needed to ensure that we are not getting multiple mouse scroll events
wxSetEnv( wxT( "GDK_CORE_DEVICE_EVENTS" ), wxT( "1" ) );
}
#endif