Wayland: add KICAD_WAYLAND_TRICKS env variable.
This commit is contained in:
parent
d5801a48d3
commit
3e710fe7c9
|
@ -39,6 +39,14 @@ void KIPLATFORM::ENV::Init()
|
||||||
wxString gdkBackend;
|
wxString gdkBackend;
|
||||||
wxGetEnv( wxT( "GDK_BACKEND" ), &gdkBackend );
|
wxGetEnv( wxT( "GDK_BACKEND" ), &gdkBackend );
|
||||||
|
|
||||||
|
// Set KICAD_WAYLAND_TRICKS to develop for native Wayland.
|
||||||
|
if( wxGetEnv( wxT( "KICAD_WAYLAND_TRICKS" ), nullptr ) )
|
||||||
|
{
|
||||||
|
wxSetEnv( wxT( "GDK_BACKEND" ), wxT( "wayland" ) );
|
||||||
|
gdk_set_allowed_backends( "wayland" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if( gdkBackend == wxT( "broadway" ) )
|
if( gdkBackend == wxT( "broadway" ) )
|
||||||
{
|
{
|
||||||
// Work around static setter in wx
|
// Work around static setter in wx
|
||||||
|
@ -50,6 +58,7 @@ void KIPLATFORM::ENV::Init()
|
||||||
// required until wxWidgets supports the Wayland compositors
|
// required until wxWidgets supports the Wayland compositors
|
||||||
wxSetEnv( wxT( "GDK_BACKEND" ), wxT( "x11" ) );
|
wxSetEnv( wxT( "GDK_BACKEND" ), wxT( "x11" ) );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set GTK2-style input instead of xinput2. This disables touchscreen and smooth
|
// Set GTK2-style input instead of xinput2. This disables touchscreen and smooth
|
||||||
// scrolling. It's needed to ensure that we are not getting multiple mouse scroll
|
// scrolling. It's needed to ensure that we are not getting multiple mouse scroll
|
||||||
|
|
Loading…
Reference in New Issue