From c1fb801ff33c13bb667e32a58a8c9165fb1406cb Mon Sep 17 00:00:00 2001 From: yw4z Date: Sun, 18 Oct 2026 17:45:30 +0300 Subject: [PATCH] Linux: Show display backend of app on Troubleshoot dialog (#16615) * init * Update TroubleshootDialog.cpp * fix build --- src/slic3r/GUI/TroubleshootDialog.cpp | 24 +++++++++++++++++++++++- src/slic3r/GUI/TroubleshootDialog.hpp | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/TroubleshootDialog.cpp b/src/slic3r/GUI/TroubleshootDialog.cpp index 20ca84d220..82aa4b659c 100644 --- a/src/slic3r/GUI/TroubleshootDialog.cpp +++ b/src/slic3r/GUI/TroubleshootDialog.cpp @@ -74,6 +74,7 @@ #endif #ifdef __LINUX__ +#include "LinuxDisplayBackend.hpp" #include #include #include @@ -201,7 +202,11 @@ TroubleshootDialog::TroubleshootDialog() return std::vector{GetOStype()}; return std::vector{ GetOSinfo(), +#ifdef __LINUX__ + GetPackageType() + GetAppDisplayBackend(), +#else GetPackageType(), +#endif GetCPUinfo(), GetRAMinfo() + " RAM", GetGPUinfo(), @@ -434,10 +439,15 @@ wxString TroubleshootDialog::GetTimestamp() wxString TroubleshootDialog::GetSysInfoAll() { + wxString package = GetPackageType(); +#ifdef __LINUX__ + package += GetAppDisplayBackend(); +#endif + wxString info; info += "Version : " + wxString(SoftFever_VERSION) + "\n" + "Build : " + wxString(build_commit_label) + "\n" - + "Package : " + GetPackageType() + "\n" + + "Package : " + package + "\n" + "Platform : " + GetOSinfo() + "\n" + "Processor : " + GetCPUinfo() + "\n" + "Memory : " + GetRAMinfo() + "RAM" + "\n" @@ -751,6 +761,18 @@ wxString TroubleshootDialog::GetLinuxDisplayServer() return ""; } + +wxString TroubleshootDialog::GetAppDisplayBackend() +{ + // Display backend actually used by the app (GDK), not the session type + wxString display; + switch (get_linux_display_backend()) { + case LinuxDisplayBackend::X11: display = "X11"; break; + case LinuxDisplayBackend::Wayland: display = "Wayland"; break; + default: break; + } + return display.IsEmpty() ? "" : (" (" + display + ")"); // spacing included here to prevent non centered text +} #endif wxString TroubleshootDialog::GetPackageType() diff --git a/src/slic3r/GUI/TroubleshootDialog.hpp b/src/slic3r/GUI/TroubleshootDialog.hpp index f8b1e5fbaa..003e49b8f8 100644 --- a/src/slic3r/GUI/TroubleshootDialog.hpp +++ b/src/slic3r/GUI/TroubleshootDialog.hpp @@ -68,6 +68,7 @@ protected: #elif defined(__LINUX__) wxString GetLinuxDistroName(); wxString GetLinuxDisplayServer(); + wxString GetAppDisplayBackend(); #endif wxString GetPackageType(); wxString GetCPUinfo();