|
|
|
@ -70,10 +70,14 @@ namespace Avalonia.X11 |
|
|
|
if (options.UseDBusMenu) |
|
|
|
DBusHelper.TryInitialize(); |
|
|
|
|
|
|
|
IRenderTimer timer = options.ShouldRenderOnUIThread |
|
|
|
? new UiThreadRenderTimer(60) |
|
|
|
: new SleepLoopRenderTimer(60); |
|
|
|
|
|
|
|
AvaloniaLocator.CurrentMutable.BindToSelf(this) |
|
|
|
.Bind<IWindowingPlatform>().ToConstant(this) |
|
|
|
.Bind<IDispatcherImpl>().ToConstant(new X11PlatformThreading(this)) |
|
|
|
.Bind<IRenderTimer>().ToConstant(new SleepLoopRenderTimer(60)) |
|
|
|
.Bind<IRenderTimer>().ToConstant(timer) |
|
|
|
.Bind<PlatformHotkeyConfiguration>().ToConstant(new PlatformHotkeyConfiguration(KeyModifiers.Control)) |
|
|
|
.Bind<IKeyboardDevice>().ToFunc(() => KeyboardDevice) |
|
|
|
.Bind<ICursorFactory>().ToConstant(new X11CursorFactory(Display)) |
|
|
|
@ -303,7 +307,14 @@ namespace Avalonia |
|
|
|
/// </remarks>
|
|
|
|
public bool EnableSessionManagement { get; set; } = |
|
|
|
Environment.GetEnvironmentVariable("AVALONIA_X11_USE_SESSION_MANAGEMENT") != "0"; |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Render directly on the UI thread instead of using a dedicated render thread.
|
|
|
|
/// This can be usable if your device don't have multiple cores to begin with.
|
|
|
|
/// This setting is false by default.
|
|
|
|
/// </summary>
|
|
|
|
public bool ShouldRenderOnUIThread { get; set; } |
|
|
|
|
|
|
|
public IList<GlVersion> GlProfiles { get; set; } = new List<GlVersion> |
|
|
|
{ |
|
|
|
new GlVersion(GlProfileType.OpenGL, 4, 0), |
|
|
|
|