mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-11-29 17:51:43 +01:00
* Fix Linux WebView blank window on Wayland and improve sign-in logging (#2129) - Set WEBKIT_DISABLE_COMPOSITING_MODE=1 and WEBKIT_DISABLE_DMABUF_RENDERER=1 on Linux startup in Program.cs so WebKitGTK does not fail silently on Wayland/Xwayland when hardware acceleration or DMABUF compositing is buggy. - Add Configuration.IsWayland and Configuration.IsWaylandSession in LibationFileManager to detect Wayland desktop sessions. - In AvaloniaLoginChoiceEager, only set gtkArgs.ForceX11GdkBackend = true when not running in a Wayland session (!Configuration.IsWayland). On Wayland (e.g. Fedora KDE Plasma 6), forcing X11 forces Xwayland, causing compositor mismatches and blank rendering. - Add debug/warning logging for WebView adapter creation, navigation start, success, and failure in AvaloniaLoginChoiceEager. - Add unit tests for Configuration.IsWaylandSession in LibationFileManager.Tests. * Support RPM 4.20+ isolated build directory in Bundle_Redhat.sh RPM 4.20 introduced per-package build directory isolation (%mkbuilddir), which runs %install in %{_builddir}/%{name}-%{version}-build rather than %{_builddir}. This caused Bundle_Redhat.sh to fail on newer runners (e.g. GitHub Actions Ubuntu 26.04) because files were staged in %{_builddir}. In %install, detect if files are not present in the current working directory and copy them from %{_builddir}.
54 lines
1.1 KiB
C#
54 lines
1.1 KiB
C#
using LibationFileManager;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
namespace LibationFileManager.Tests;
|
|
|
|
[TestClass]
|
|
public class EnvironmentConfigurationTests
|
|
{
|
|
[TestMethod]
|
|
public void wayland_session_is_detected_when_wayland_display_is_set()
|
|
{
|
|
var isWayland = Configuration.IsWaylandSession(varName => varName switch
|
|
{
|
|
"WAYLAND_DISPLAY" => "wayland-0",
|
|
_ => null
|
|
});
|
|
|
|
Assert.IsTrue(isWayland);
|
|
}
|
|
|
|
[TestMethod]
|
|
public void wayland_session_is_detected_when_xdg_session_type_is_wayland()
|
|
{
|
|
var isWayland = Configuration.IsWaylandSession(varName => varName switch
|
|
{
|
|
"XDG_SESSION_TYPE" => "wayland",
|
|
_ => null
|
|
});
|
|
|
|
Assert.IsTrue(isWayland);
|
|
}
|
|
|
|
[TestMethod]
|
|
public void wayland_session_is_not_detected_when_x11()
|
|
{
|
|
var isWayland = Configuration.IsWaylandSession(varName => varName switch
|
|
{
|
|
"XDG_SESSION_TYPE" => "x11",
|
|
"DISPLAY" => ":0",
|
|
_ => null
|
|
});
|
|
|
|
Assert.IsFalse(isWayland);
|
|
}
|
|
|
|
[TestMethod]
|
|
public void wayland_session_is_not_detected_when_env_empty()
|
|
{
|
|
var isWayland = Configuration.IsWaylandSession(_ => null);
|
|
|
|
Assert.IsFalse(isWayland);
|
|
}
|
|
}
|