Enable Wayland tricks by default when configured with KICAD_WAYLAND=1.
This commit is contained in:
parent
89cb35dc22
commit
8db400500d
|
@ -39,8 +39,17 @@ 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.
|
#ifdef KICAD_WAYLAND
|
||||||
|
bool waylandTricks = true;
|
||||||
|
#else
|
||||||
|
bool waylandTricks = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
if( wxGetEnv( wxT( "KICAD_WAYLAND_TRICKS" ), nullptr ) )
|
if( wxGetEnv( wxT( "KICAD_WAYLAND_TRICKS" ), nullptr ) )
|
||||||
|
waylandTricks = true;
|
||||||
|
|
||||||
|
// Set KICAD_WAYLAND_TRICKS to develop for native Wayland.
|
||||||
|
if( waylandTricks )
|
||||||
{
|
{
|
||||||
wxSetEnv( wxT( "GDK_BACKEND" ), wxT( "wayland" ) );
|
wxSetEnv( wxT( "GDK_BACKEND" ), wxT( "wayland" ) );
|
||||||
gdk_set_allowed_backends( "wayland" );
|
gdk_set_allowed_backends( "wayland" );
|
||||||
|
|
Loading…
Reference in New Issue